| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/HostingSpaces/admin/chatme24.com/wwwroot/_server/jquery/ |
Upload File : |
jQuery.fn.tooltip = function(options) {
var options = jQuery.extend({
txt: '',
maxWidth: 300,
effect: 'fadeIn',
duration: 300
},options);
var helper,effect={},el_tips={};
if(!$("div.tooltip").length)
$(function() {helper = $('<div class="tooltip"></div>').appendTo(document.body).hide();});
else helper = $("div.tooltip").stop().hide();
effect.show = options.effect;
switch(options.effect) {
case 'fadeIn': effect.hide = 'fadeOut'; break;
case 'show': effect.hide = 'hide'; break;
case 'slideDown': effect.hide = 'slideUp'; break;
default: effect.hide = 'fadeOut'; break;
}
return this.each(function() {
if(options.txt) el_tips[$.data(this)] = options.txt;
else el_tips[$.data(this)] = this.title;
this.title = '';
this.alt = '';
}).mouseover(
function () {
if(el_tips[$.data(this)] != '') {
helper.css('width','');
helper.html(el_tips[$.data(this)]);
if(helper.width() > options.maxWidth) helper.width(options.maxWidth);
eval('helper.stop().hide();');
eval('helper.stop().delay(500).'+effect.show+'('+options.duration+')');
$(this).bind('mousemove', update);
}
}
).mouseout(
function () {
$(this).unbind('mousemove', update);
eval('helper.'+effect.hide+'('+options.duration+')');
}
);
function update(e) {
if (e.pageX + helper.width() + 40 > $(document).scrollLeft() + window.screen.availWidth)
helper.css({left: e.pageX - helper.width() - 25 + "px"});
else helper.css({left: e.pageX + 5 + "px"});
if (e.pageY - helper.height() - 10 < $(document).scrollTop()) helper.css({top: e.pageY + 5 + "px"});
else helper.css({top: e.pageY - helper.height() - 5 + "px"});
};
};