diff --git a/dist/jquery.qtip.basic.js b/dist/jquery.qtip.basic.js
index eb36539a..6711d9f6 100644
--- a/dist/jquery.qtip.basic.js
+++ b/dist/jquery.qtip.basic.js
@@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
-* Date: Tue Sep 20 17:01:42 2011 +0100
+* Date: Tue Sep 20 22:20:54 2011 +0100
*/
/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
@@ -249,13 +249,9 @@ function QTip(target, options, id, attr)
// Create button and setup attributes
elements.button.appendTo(elements.titlebar)
.attr('role', 'button')
- .hover(function(event){ $(this).toggleClass('ui-state-hover', event.type === 'mouseenter'); })
.click(function(event) {
if(!tooltip.hasClass(disabled)) { self.hide(event); }
return FALSE;
- })
- .bind('mousedown keydown mouseup keyup mouseout', function(event) {
- $(this).toggleClass('ui-state-active ui-state-focus', event.type.substr(-4) === 'down');
});
// Redraw the tooltip when we're done
@@ -280,11 +276,20 @@ function QTip(target, options, id, attr)
'aria-atomic': TRUE
})
)
- .insertBefore(elements.content);
+ .insertBefore(elements.content)
+
+ // Button-specific events
+ .delegate('.ui-state-default', 'mousedown keydown mouseup keyup mouseout', function(event) {
+ $(this).toggleClass('ui-state-active ui-state-focus', event.type.substr(-4) === 'down');
+ })
+ .delegate('.ui-state-default', 'mouseover mouseout', function(event){
+ $(this).toggleClass('ui-state-hover', event.type === 'mouseover');
+ });
// Create button if enabled
if(options.content.title.button) { createButton(); }
+
// Redraw the tooltip dimensions if it's rendered
else if(self.rendered){ self.redraw(); }
}
diff --git a/dist/jquery.qtip.css b/dist/jquery.qtip.css
index 8cee222c..4a1d634d 100644
--- a/dist/jquery.qtip.css
+++ b/dist/jquery.qtip.css
@@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
-* Date: Tue Sep 20 17:01:42 2011 +0100
+* Date: Tue Sep 20 22:20:54 2011 +0100
*/
/* Core qTip styles */
diff --git a/dist/jquery.qtip.js b/dist/jquery.qtip.js
index 72717e97..ec927d54 100644
--- a/dist/jquery.qtip.js
+++ b/dist/jquery.qtip.js
@@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
-* Date: Tue Sep 20 17:01:42 2011 +0100
+* Date: Tue Sep 20 22:20:54 2011 +0100
*/
/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
@@ -249,13 +249,9 @@ function QTip(target, options, id, attr)
// Create button and setup attributes
elements.button.appendTo(elements.titlebar)
.attr('role', 'button')
- .hover(function(event){ $(this).toggleClass('ui-state-hover', event.type === 'mouseenter'); })
.click(function(event) {
if(!tooltip.hasClass(disabled)) { self.hide(event); }
return FALSE;
- })
- .bind('mousedown keydown mouseup keyup mouseout', function(event) {
- $(this).toggleClass('ui-state-active ui-state-focus', event.type.substr(-4) === 'down');
});
// Redraw the tooltip when we're done
@@ -280,11 +276,20 @@ function QTip(target, options, id, attr)
'aria-atomic': TRUE
})
)
- .insertBefore(elements.content);
+ .insertBefore(elements.content)
+
+ // Button-specific events
+ .delegate('.ui-state-default', 'mousedown keydown mouseup keyup mouseout', function(event) {
+ $(this).toggleClass('ui-state-active ui-state-focus', event.type.substr(-4) === 'down');
+ })
+ .delegate('.ui-state-default', 'mouseover mouseout', function(event){
+ $(this).toggleClass('ui-state-hover', event.type === 'mouseover');
+ });
// Create button if enabled
if(options.content.title.button) { createButton(); }
+
// Redraw the tooltip dimensions if it's rendered
else if(self.rendered){ self.redraw(); }
}
diff --git a/dist/jquery.qtip.min.js b/dist/jquery.qtip.min.js
index 5691e0e9..cb0bdcf8 100644
--- a/dist/jquery.qtip.min.js
+++ b/dist/jquery.qtip.min.js
@@ -9,5 +9,5 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
-* Date: Tue Sep 20 17:01:42 2011 +0100
-*//*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true *//*global window: false, jQuery: false, console: false */(function(a,b,c){function E(b,g){function w(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function v(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function u(a,b,c){b=b?b:a[a.precedance];var d=l.hasClass(r),e=k.titlebar&&a.y==="top",f=e?k.titlebar:k.content,g="border-"+b+"-width",h;l.addClass(r),h=parseInt(f.css(g),10),h=(c?h||parseInt(l.css(g),10):h)||0,l.toggleClass(r,d);return h}function t(f,g,h,l){if(k.tip){var n=a.extend({},i.corner),o=h.adjusted,p=b.options.position.adjust.method.split(" "),q=p[0],r=p[1]||p[0],s={left:e,top:e,x:0,y:0},t,u={},v;i.corner.fixed!==d&&(q==="shift"&&n.precedance==="x"&&o.left&&n.y!=="center"?n.precedance=n.precedance==="x"?"y":"x":q==="flip"&&o.left&&(n.x=n.x==="center"?o.left>0?"left":"right":n.x==="left"?"right":"left"),r==="shift"&&n.precedance==="y"&&o.top&&n.x!=="center"?n.precedance=n.precedance==="y"?"x":"y":r==="flip"&&o.top&&(n.y=n.y==="center"?o.top>0?"top":"bottom":n.y==="top"?"bottom":"top"),n.string()!==m.corner&&(m.top!==o.top||m.left!==o.left)&&i.update(n,e)),t=i.position(n,o),t.right!==c&&(t.left=-t.right),t.bottom!==c&&(t.top=-t.bottom),t.user=Math.max(0,j.offset);if(s.left=q==="shift"&&!!o.left)n.x==="center"?u["margin-left"]=s.x=t["margin-left"]-o.left:(v=t.right!==c?[o.left,-t.left]:[-o.left,t.left],(s.x=Math.max(v[0],v[1]))>v[0]&&(h.left-=o.left,s.left=e),u[t.right!==c?"right":"left"]=s.x);if(s.top=r==="shift"&&!!o.top)n.y==="center"?u["margin-top"]=s.y=t["margin-top"]-o.top:(v=t.bottom!==c?[o.top,-t.top]:[-o.top,t.top],(s.y=Math.max(v[0],v[1]))>v[0]&&(h.top-=o.top,s.top=e),u[t.bottom!==c?"bottom":"top"]=s.y);k.tip.css(u).toggle(!(s.x&&s.y||n.x==="center"&&s.y||n.y==="center"&&s.x)),h.left-=t.left.charAt?t.user:q!=="shift"||s.top||!s.left&&!s.top?t.left:0,h.top-=t.top.charAt?t.user:r!=="shift"||s.left||!s.left&&!s.top?t.top:0,m.left=o.left,m.top=o.top,m.corner=n.string()}}var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={top:0,left:0,corner:""},n={width:j.width,height:j.height},o={},p=j.border||0,q=".qtip-tip",s=!!(a("")[0]||{}).getContext;i.mimic=i.corner=f,i.border=p,i.offset=j.offset,i.size=n,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(s||a.browser.msie);b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,t));return b},detectCorner:function(){var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;if(a===e||g===e&&f===e)return e;a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);return i.corner.string()!=="centercenter"},detectColours:function(){var c,d,e,f=k.tip.css({backgroundColor:"",border:""}),g=i.corner,h=g[g.precedance],m="border-"+h+"-color",p="border"+h.charAt(0)+h.substr(1)+"Color",q=/rgba?\(0, 0, 0(, 0)?\)|transparent/i,s="background-color",t="transparent",u=a(document.body).css("color"),v=b.elements.content.css("color"),w=k.titlebar&&(g.y==="top"||g.y==="center"&&f.position().top+n.height/2+j.offset