Permalink
Browse files

updating minified tooltipster js

  • Loading branch information...
1 parent f3e9a59 commit 7f7ab14edbc2a068ec466ca8a9d9de485147722c @iamceege committed Sep 15, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 index.html
  2. +1 −1 js/jquery.tooltipster.min.js
View
4 index.html
@@ -8,14 +8,14 @@
<link rel="stylesheet" type="text/css" href="css/tooltipster.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
- <script type="text/javascript" src="js/jquery.tooltipster.js"></script>
+ <script type="text/javascript" src="js/jquery.tooltipster.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.tooltip').tooltipster({
position: 'top',
- fixedWidth: 300
+ fixedWidth: 0
});
});
View
2 js/jquery.tooltipster.min.js
@@ -1,2 +1,2 @@
//Tooltipster 1.2 | 9/15/12 | by Caleb Jacob
-(function(a){a.fn.tooltipster=function(b){var c=a.extend({animation:"fade",arrow:true,arrowColor:"",delay:200,fixedWidth:0,followMouse:false,offsetX:0,offsetY:0,overrideText:"",position:"top",speed:100,timer:0,tooltipTheme:".tooltip-message"},b);function d(e){if(c.animation=="slide"){a(e).slideUp(c.speed,function(){a(e).remove();a("body").css("overflow-x","auto")})}else{a(e).fadeOut(c.speed,function(){a(e).remove();a("body").css("overflow-x","auto")})}}return this.hover(function(){if(a(c.tooltipTheme).not(".tooltip-kill").length==1){d(a(c.tooltipTheme).not(".tooltip-kill"));a(c.tooltipTheme).not(".tooltip-kill").addClass("tooltip-kill")}a("body").css("overflow-x","hidden");var g=a(this).attr("title");a(this).attr("title","");a(this).data("title",g);if(a.trim(c.overrideText).length>0){var g=c.overrideText}if(c.fixedWidth>0){var v=' style="width:'+c.fixedWidth+'px;"'}else{var v=""}a('<div class="'+c.tooltipTheme.replace(".","")+'"'+v+'><div class="tooltip-message-content">'+g+"</div></div>").appendTo("body").hide();if(c.followMouse==false){var i=a(window).width();var n=a(this).outerWidth(false);var o=a(this).outerHeight(false);var w=a(c.tooltipTheme).not(".tooltip-kill").outerWidth(false);var q=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);var m=a(this).offset();a(c.tooltipTheme).not(".tooltip-kill").css({width:w+"px","padding-left":"0px","padding-right":"0px"});function y(){var B=a(window).scrollLeft();if((j-B)<0){var A=j-B;j=B;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition",A)}if(((j+w)-B)>i){var A=j-((i+B)-w);j=(i+B)-w;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition",A)}}if(c.position=="top"){var l=(m.left+w)-(m.left+a(this).outerWidth(false));var j=(m.left+c.offsetX)-(l/2);var u=(m.top-q)-c.offsetY-10;y();if((m.top-q-c.offsetY-11)<0){var u=0}}if(c.position=="top-left"){var j=m.left+c.offsetX;var u=(m.top-q)-c.offsetY-10;y()}if(c.position=="top-right"){var j=(m.left+n+c.offsetX)-w;var u=(m.top-q)-c.offsetY-10;y()}if(c.position=="bottom"){var l=(m.left+w+c.offsetX)-(m.left+a(this).outerWidth(false));var j=m.left-(l/2);var u=(m.top+o)+c.offsetY+10;y()}if(c.position=="bottom-left"){var j=m.left+c.offsetX;var u=(m.top+o)+c.offsetY+10;y()}if(c.position=="bottom-right"){var j=(m.left+n+c.offsetX)-w;var u=(m.top+o)+c.offsetY+10;y()}if(c.position=="left"){var j=m.left-c.offsetX-w-10;var e=m.left+c.offsetX+n+10;var x=(m.top+q+c.offsetY)-(m.top+a(this).outerHeight(false));var u=m.top-(x/2);if((j<0)&&((e+w)>i)){j=j+w}if(j<0){var j=m.left+c.offsetX+n+10;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition","left")}}if(c.position=="right"){var j=m.left+c.offsetX+n+10;var e=m.left-c.offsetX-w-10;var x=(m.top+q+c.offsetY)-(m.top+a(this).outerHeight(false));var u=m.top-(x/2);if(((j+w)>i)&&(e<0)){j=i-w}if((j+w)>i){j=m.left-c.offsetX-w-10;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition","right")}}}if(c.followMouse==true){var w=a(c.tooltipTheme).not(".tooltip-kill").outerWidth(false);var q=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);var p=a(c.tooltipTheme).not(".tooltip-kill").find(".tooltip-message-content").html();a(this).mousemove(function(A){a(c.tooltipTheme).not(".tooltip-kill").find(".tooltip-message-content").html("").html(p);var B=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);if(c.position=="top"){a(c.tooltipTheme).not(".tooltip-kill").css({left:((A.pageX-1)-(w/2)+c.offsetX)+"px",top:((A.pageY-B-2)-c.offsetY-10)+"px"})}if(c.position=="top-right"){a(c.tooltipTheme).not(".tooltip-kill").css({left:A.pageX-8+c.offsetX+"px",top:((A.pageY-B-2)-c.offsetY-10)+"px"})}if(c.position=="top-left"){a(c.tooltipTheme).not(".tooltip-kill").css({left:(A.pageX-w+c.offsetX)+7+"px",top:((A.pageY-B-2)-c.offsetY-10)+"px"})}if(c.position=="bottom"){a(c.tooltipTheme).not(".tooltip-kill").css({left:(A.pageX-(w/2)+c.offsetX-1)+"px",top:(A.pageY+15+c.offsetY+10)+"px"})}if(c.position=="bottom-right"){a(c.tooltipTheme).not(".tooltip-kill").css({left:A.pageX-2+c.offsetX+"px",top:(A.pageY+15+c.offsetY+10)+"px"})}if(c.position=="bottom-left"){a(c.tooltipTheme).not(".tooltip-kill").css({left:(A.pageX-w+c.offsetX)+12+"px",top:(A.pageY+15+c.offsetY+10)+"px"})}})}if(c.arrow==true){var f="tooltip-arrow-"+c.position;if(c.followMouse==true){if(f.search("right")>0){var z=f;f=z.replace("right","left")}else{var z=f;f=z.replace("left","right")}}if(f=="tooltip-arrow-right"){var s="◀";var t="top:"+((q/2)-5)+"px"}if(f=="tooltip-arrow-left"){var s="▶";var t="top:"+((q/2)-4)+"px"}if(f.search("top")>0){var s="▼"}if(f.search("bottom")>0){var s="▲"}if(c.arrowColor.length<1){var k=a(c.tooltipTheme).not(".tooltip-kill").css("background-color")}else{var k=c.arrowColor}var r=a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition");if(!r){r=""}else{if(r=="left"){f="tooltip-arrow-right";s="◀";r=""}else{if(r=="right"){f="tooltip-arrow-left";s="▶";r=""}else{r="left:"+r+"px;"}}}var h='<div class="'+f+' tooltip-arrow" style="color:'+k+"; width:"+w+"px; display:none; "+r+" "+t+'">'+s+"</div>"}else{var h=""}a(c.tooltipTheme).not(".tooltip-kill").css({top:u+"px",left:j+"px"}).append(h);if(c.animation=="slide"){a(c.tooltipTheme).not(".tooltip-kill").delay(c.delay).slideDown(c.speed,function(){a(".tooltip-arrow").fadeIn(c.speed)});if(c.timer>0){a(c.tooltipTheme).not(".tooltip-kill").delay(c.timer).slideUp(c.speed)}}else{a(".tooltip-arrow").show();a(c.tooltipTheme).not(".tooltip-kill").delay(c.delay).fadeIn(c.speed);if(c.timer>0){a(c.tooltipTheme).not(".tooltip-kill").delay(c.timer).fadeOut(c.speed)}}},function(){a(c.tooltipTheme).not(".tooltip-kill").clearQueue();tooltip_text=a(this).data("title");a(this).attr("title",tooltip_text);a(c.tooltipTheme).addClass("tooltip-kill");d(".tooltip-kill")})}})(jQuery);
+(function(a){a.fn.tooltipster=function(b){function d(b){if(c.animation=="slide"){a(b).slideUp(c.speed,function(){a(b).remove();a("body").css("overflow-x","auto")})}else{a(b).fadeOut(c.speed,function(){a(b).remove();a("body").css("overflow-x","auto")})}}var c=a.extend({animation:"fade",arrow:true,arrowColor:"",delay:200,fixedWidth:0,followMouse:false,offsetX:0,offsetY:0,overrideText:"",position:"top",speed:100,timer:0,tooltipTheme:".tooltip-message"},b);return this.hover(function(){if(a(c.tooltipTheme).not(".tooltip-kill").length==1){d(a(c.tooltipTheme).not(".tooltip-kill"));a(c.tooltipTheme).not(".tooltip-kill").addClass("tooltip-kill")}a("body").css("overflow-x","hidden");var b=a(this).attr("title");a(this).attr("title","");a(this).data("title",b);if(a.trim(c.overrideText).length>0){var b=c.overrideText}if(c.fixedWidth>0){var e=' style="width:'+c.fixedWidth+'px;"'}else{var e=""}a('<div class="'+c.tooltipTheme.replace(".","")+'"'+e+'><div class="tooltip-message-content">'+b+"</div></div>").appendTo("body").hide();if(c.followMouse==false){var f=a(window).width();var g=a(this).outerWidth(false);var h=a(this).outerHeight(false);var i=a(c.tooltipTheme).not(".tooltip-kill").outerWidth(false);var j=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);var k=a(this).offset();if(c.fixedWidth==0){a(c.tooltipTheme).not(".tooltip-kill").css({width:i+"px","padding-left":"0px","padding-right":"0px"})}function l(){var b=a(window).scrollLeft();if(n-b<0){var d=n-b;n=b;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition",d)}if(n+i-b>f){var d=n-(f+b-i);n=f+b-i;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition",d)}}if(c.position=="top"){var m=k.left+i-(k.left+a(this).outerWidth(false));var n=k.left+c.offsetX-m/2;var o=k.top-j-c.offsetY-10;l();if(k.top-j-c.offsetY-11<0){var o=0}}if(c.position=="top-left"){var n=k.left+c.offsetX;var o=k.top-j-c.offsetY-10;l()}if(c.position=="top-right"){var n=k.left+g+c.offsetX-i;var o=k.top-j-c.offsetY-10;l()}if(c.position=="bottom"){var m=k.left+i+c.offsetX-(k.left+a(this).outerWidth(false));var n=k.left-m/2;var o=k.top+h+c.offsetY+10;l()}if(c.position=="bottom-left"){var n=k.left+c.offsetX;var o=k.top+h+c.offsetY+10;l()}if(c.position=="bottom-right"){var n=k.left+g+c.offsetX-i;var o=k.top+h+c.offsetY+10;l()}if(c.position=="left"){var n=k.left-c.offsetX-i-10;var p=k.left+c.offsetX+g+10;var q=k.top+j+c.offsetY-(k.top+a(this).outerHeight(false));var o=k.top-q/2;if(n<0&&p+i>f){n=n+i}if(n<0){var n=k.left+c.offsetX+g+10;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition","left")}}if(c.position=="right"){var n=k.left+c.offsetX+g+10;var p=k.left-c.offsetX-i-10;var q=k.top+j+c.offsetY-(k.top+a(this).outerHeight(false));var o=k.top-q/2;if(n+i>f&&p<0){n=f-i}if(n+i>f){n=k.left-c.offsetX-i-10;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition","right")}}}if(c.followMouse==true){var i=a(c.tooltipTheme).not(".tooltip-kill").outerWidth(false);var j=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);var r=a(c.tooltipTheme).not(".tooltip-kill").find(".tooltip-message-content").html();a(this).mousemove(function(b){a(c.tooltipTheme).not(".tooltip-kill").find(".tooltip-message-content").html("").html(r);var d=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);if(c.position=="top"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-1-i/2+c.offsetX+"px",top:b.pageY-d-2-c.offsetY-10+"px"})}if(c.position=="top-right"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-8+c.offsetX+"px",top:b.pageY-d-2-c.offsetY-10+"px"})}if(c.position=="top-left"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-i+c.offsetX+7+"px",top:b.pageY-d-2-c.offsetY-10+"px"})}if(c.position=="bottom"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-i/2+c.offsetX-1+"px",top:b.pageY+15+c.offsetY+10+"px"})}if(c.position=="bottom-right"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-2+c.offsetX+"px",top:b.pageY+15+c.offsetY+10+"px"})}if(c.position=="bottom-left"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-i+c.offsetX+12+"px",top:b.pageY+15+c.offsetY+10+"px"})}})}if(c.arrow==true){var s="tooltip-arrow-"+c.position;if(c.followMouse==true){if(s.search("right")>0){var t=s;s=t.replace("right","left")}else{var t=s;s=t.replace("left","right")}}if(s=="tooltip-arrow-right"){var u="◀";var v="top:"+(j/2-5)+"px"}if(s=="tooltip-arrow-left"){var u="▶";var v="top:"+(j/2-4)+"px"}if(s.search("top")>0){var u="▼"}if(s.search("bottom")>0){var u="▲"}if(c.arrowColor.length<1){var w=a(c.tooltipTheme).not(".tooltip-kill").css("background-color")}else{var w=c.arrowColor}var x=a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition");if(!x){x=""}else if(x=="left"){s="tooltip-arrow-right";u="◀";x=""}else if(x=="right"){s="tooltip-arrow-left";u="▶";x=""}else{x="left:"+x+"px;"}var y='<div class="'+s+' tooltip-arrow" style="color:'+w+"; width:"+i+"px; display:none; "+x+" "+v+'">'+u+"</div>"}else{var y=""}a(c.tooltipTheme).not(".tooltip-kill").css({top:o+"px",left:n+"px"}).append(y);if(c.animation=="slide"){a(c.tooltipTheme).not(".tooltip-kill").delay(c.delay).slideDown(c.speed,function(){a(".tooltip-arrow").fadeIn(c.speed)});if(c.timer>0){a(c.tooltipTheme).not(".tooltip-kill").delay(c.timer).slideUp(c.speed)}}else{a(".tooltip-arrow").show();a(c.tooltipTheme).not(".tooltip-kill").delay(c.delay).fadeIn(c.speed);if(c.timer>0){a(c.tooltipTheme).not(".tooltip-kill").delay(c.timer).fadeOut(c.speed)}}},function(){a(c.tooltipTheme).not(".tooltip-kill").clearQueue();tooltip_text=a(this).data("title");a(this).attr("title",tooltip_text);a(c.tooltipTheme).addClass("tooltip-kill");d(".tooltip-kill")})}})(jQuery);

0 comments on commit 7f7ab14

Please sign in to comment.