Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated minified file from bug fix

  • Loading branch information...
commit 9f7efdd3dc6150b9c6f0e34771fdb93c2e24918e 1 parent 912eb92
Brian Cray authored
Showing with 1 addition and 18 deletions.
  1. +1 −18 tooltipsy.min.js
View
19 tooltipsy.min.js
@@ -11,21 +11,4 @@
* - className: DOM class for styling tooltips with CSS. Defaults to "tooltipsy"
* More information visit http://tooltipsy.com/
*/
-(function($){$.tooltipsy=function(el,options){this.options=options;this.$el=$(el);this.random=parseInt(Math.random()*10000);this.ready=false;this.shown=false;this.width=0;this.height=0;this.delaytimer=null;this.$el.data("tooltipsy",this);this.init();};$.tooltipsy.prototype.init=function(){var base=this;base.settings=$.extend({},base.defaults,base.options);base.settings.delay=parseInt(base.settings.delay);if(typeof base.settings.content==='function'){base.readify();}
-base.$el.bind('mouseenter',function(e){if(base.settings.delay>0){base.delaytimer=window.setTimeout(function(){base.enter(e);},base.settings.delay);}
-else{base.enter(e);}}).bind('mouseleave',function(e){window.clearTimeout(base.delaytimer);base.delaytimer=null;base.leave(e);});};$.tooltipsy.prototype.enter=function(e){var base=this;if(base.ready===false){base.readify();}
-if(base.shown===false){if((function(o){var s=0,k;for(k in o){if(o.hasOwnProperty(k)){s++;}}
-return s;})(base.settings.css)>0){base.$tip.css(base.settings.css);}
-base.width=base.$tipsy.outerWidth();base.height=base.$tipsy.outerHeight();}
-if(base.settings.alignTo=='cursor'){var tip_position=[e.pageX+base.settings.offset[0],e.pageY+base.settings.offset[1]];if(tip_position[0]+base.width>$(window).width()){var tip_css={top:tip_position[1]+'px',right:tip_position[0]+'px',left:'auto'};}
-else{var tip_css={top:tip_position[1]+'px',left:tip_position[0]+'px',right:'auto'};}}
-else{var tip_position=[(function(pos){if(base.settings.offset[0]<0){return pos.left-Math.abs(base.settings.offset[0])-base.width;}
-else if(base.settings.offset[0]==0){return pos.left-((base.width-base.$el.outerWidth())/2);}
-else{return pos.left+base.$el.outerWidth()+base.settings.offset[0];}})(base.offset(base.$el[0])),(function(pos){if(base.settings.offset[1]<0){return pos.top-Math.abs(base.settings.offset[1])-base.height;}
-else if(base.settings.offset[1]==0){return pos.top-((base.height-base.$el.outerHeight())/2);}
-else{return pos.top+base.$el.outerHeight()+base.settings.offset[1];}})(base.offset(base.$el[0]))];}
-base.$tipsy.css({top:tip_position[1]+'px',left:tip_position[0]+'px'});base.settings.show(e,base.$tipsy.stop(true,true));};$.tooltipsy.prototype.leave=function(e){var base=this;if(e.relatedTarget==base.$tip[0]){base.$tip.bind('mouseleave',function(e){if(e.relatedTarget==base.$el[0]){return;}
-base.settings.hide(e,base.$tipsy.stop(true,true));});return;}
-base.settings.hide(e,base.$tipsy.stop(true,true));};$.tooltipsy.prototype.readify=function(){this.ready=true;this.title=this.$el.attr('title')||'';this.$el.attr('title','');this.$tipsy=$('<div id="tooltipsy'+this.random+'">').appendTo('body').css({position:'absolute',zIndex:'999'}).hide();this.$tip=$('<div class="'+this.settings.className+'">').appendTo(this.$tipsy);this.$tip.data('rootel',this.$el);this.$tip.html(this.settings.content!=''?this.settings.content:this.title);};$.tooltipsy.prototype.offset=function(el){var ol=ot=0;if(el.offsetParent){do{ol+=el.offsetLeft;ot+=el.offsetTop;}while(el=el.offsetParent);}
-return{left:ol,top:ot};}
-$.tooltipsy.prototype.defaults={alignTo:'element',offset:[0,-1],content:'',show:function(e,$el){$el.fadeIn(100);},hide:function(e,$el){$el.fadeOut(100);},css:{},className:'tooltipsy',delay:200};$.fn.tooltipsy=function(options){return this.each(function(){new $.tooltipsy(this,options);});};})(jQuery);
+(function(a){a.tooltipsy=function(c,b){this.options=b;this.$el=a(c);this.title=this.$el.attr("title")||"";this.$el.attr("title","");this.random=parseInt(Math.random()*10000);this.ready=false;this.shown=false;this.width=0;this.height=0;this.delaytimer=null;this.$el.data("tooltipsy",this);this.init()};a.tooltipsy.prototype.init=function(){var b=this;b.settings=a.extend({},b.defaults,b.options);b.settings.delay=parseInt(b.settings.delay);if(typeof b.settings.content==="function"){b.readify()}b.$el.bind("mouseenter",function(c){if(b.settings.delay>0){b.delaytimer=window.setTimeout(function(){b.enter(c)},b.settings.delay)}else{b.enter(c)}}).bind("mouseleave",function(c){window.clearTimeout(b.delaytimer);b.delaytimer=null;b.leave(c)})};a.tooltipsy.prototype.enter=function(f){var d=this;if(d.ready===false){d.readify()}if(d.shown===false){if((function(h){var g=0,e;for(e in h){if(h.hasOwnProperty(e)){g++}}return g})(d.settings.css)>0){d.$tip.css(d.settings.css)}d.width=d.$tipsy.outerWidth();d.height=d.$tipsy.outerHeight()}if(d.settings.alignTo=="cursor"){var c=[f.pageX+d.settings.offset[0],f.pageY+d.settings.offset[1]];if(c[0]+d.width>a(window).width()){var b={top:c[1]+"px",right:c[0]+"px",left:"auto"}}else{var b={top:c[1]+"px",left:c[0]+"px",right:"auto"}}}else{var c=[(function(e){if(d.settings.offset[0]<0){return e.left-Math.abs(d.settings.offset[0])-d.width}else{if(d.settings.offset[0]==0){return e.left-((d.width-d.$el.outerWidth())/2)}else{return e.left+d.$el.outerWidth()+d.settings.offset[0]}}})(d.offset(d.$el[0])),(function(e){if(d.settings.offset[1]<0){return e.top-Math.abs(d.settings.offset[1])-d.height}else{if(d.settings.offset[1]==0){return e.top-((d.height-d.$el.outerHeight())/2)}else{return e.top+d.$el.outerHeight()+d.settings.offset[1]}}})(d.offset(d.$el[0]))]}d.$tipsy.css({top:c[1]+"px",left:c[0]+"px"});d.settings.show(f,d.$tipsy.stop(true,true))};a.tooltipsy.prototype.leave=function(c){var b=this;if(c.relatedTarget==b.$tip[0]){b.$tip.bind("mouseleave",function(d){if(d.relatedTarget==b.$el[0]){return}b.settings.hide(d,b.$tipsy.stop(true,true))});return}b.settings.hide(c,b.$tipsy.stop(true,true))};a.tooltipsy.prototype.readify=function(){this.ready=true;this.$tipsy=a('<div id="tooltipsy'+this.random+'">').appendTo("body").css({position:"absolute",zIndex:"999"}).hide();this.$tip=a('<div class="'+this.settings.className+'">').appendTo(this.$tipsy);this.$tip.data("rootel",this.$el);this.$tip.html(this.settings.content!=""?this.settings.content:this.title)};a.tooltipsy.prototype.offset=function(c){var b=ot=0;if(c.offsetParent){do{b+=c.offsetLeft;ot+=c.offsetTop}while(c=c.offsetParent)}return{left:b,top:ot}};a.tooltipsy.prototype.defaults={alignTo:"element",offset:[0,-1],content:"",show:function(c,b){b.fadeIn(100)},hide:function(c,b){b.fadeOut(100)},css:{},className:"tooltipsy",delay:200};a.fn.tooltipsy=function(b){return this.each(function(){new a.tooltipsy(this,b)})}})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.