| Server IP : 89.108.64.180 / Your IP : 216.73.217.92 Web Server : Apache/2.4.41 (Ubuntu) System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-root ( 1010) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/spacev13.ru/wp-content/plugins/fwdrl/js/ |
Upload File : |
/**
* Revolution Lightbox PACKAGED v2.0
* Custom tooltip.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function($){
$.fn.fwdTooltip = function(obj){
'use strict';
var content = obj.content;
var tooltipClass = obj.tooltipClass;
var to;
$(this).hover(function(e){
var title = $(this).attr('title');
if(!title && !content) return;
$(this).data('toolTipText', title).removeAttr('title');
var el1 = document.createElement('div');
el1.className = 'fwd-tooltip';
var el2 = document.createElement('div');
var el3 = document.createElement('div');
el3.className = 'fwd-pointer';
el2.className = 'fwd-tooltip-in';
if(tooltipClass){
el2.className = 'fwd-tooltip-in ' + tooltipClass;
}
el1.appendChild(el2);
if(content){
el2.innerHTML = content;
}else{
el2.innerHTML = title;
}
el2.appendChild(el3);
document.documentElement.appendChild(el1);
var cursorX = e.pageX;
var cursorY = e.pageY;
var wW = $(window).width();
var wH = $(window).height();
var tooltip = el1;
var targetLeft = Math.round($(this)[0].getBoundingClientRect().x);
var targetTop = Math.round($(this)[0].getBoundingClientRect().y);
$(this)[0].tooltip = tooltip;
var targetW = $(this).width();
var targetH = $(this).height();
var ttW = tooltip.offsetWidth;
var ttH = tooltip.offsetHeight;
var pTop = targetTop - ttH;
var pLeft = Math.round(targetLeft - (ttW - targetW)/2);
var pintOffset = 0;
if(pLeft < 20){
pintOffset = pLeft - 20;
pLeft = 20;
}else if(pLeft + ttW + 20 > wW){
pintOffset = pLeft - (wW - ttW - 20);
pLeft = wW - ttW - 20;
}
var pintLeft = Math.round((ttW - el3.offsetWidth)/2) + pintOffset;
var pintCss;
if(pTop <= 20){
pTop = targetTop + targetH;
pintCss = {left:pintLeft + 'px', bottom:'calc(100% - 4px)'};
$('.fwd-tooltip-in').addClass('top');
}else{
pintCss = {left:pintLeft + 'px'}
}
$('.fwd-tooltip').css({top: pTop + 'px', left:pLeft + 'px'});
$('.fwd-pointer').css(pintCss);
}, function(e){
$(this).attr('title', $(this).data('toolTipText'));
$('.fwd-tooltip').remove();
});
};
}(jQuery));