From: kipod Date: Sat, 16 Nov 2013 21:31:23 +0000 (+0200) Subject: tipsy: using user class borks positioning of tip X-Git-Tag: 1.31.0-rc.0~17004^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=aacba4890dee42a384578cc637b22bcdce3abe34;p=lhc%2Fweb%2Fwiklou.git tipsy: using user class borks positioning of tip This is a patch by Kipod. Pushed by me. bug: 57144 Change-Id: Ic669b3c490cba95fe97ee5cad1705aef6b523d49 --- diff --git a/resources/jquery.tipsy/jquery.tipsy.js b/resources/jquery.tipsy/jquery.tipsy.js index a9fcec8fcc..e3e4b9a787 100644 --- a/resources/jquery.tipsy/jquery.tipsy.js +++ b/resources/jquery.tipsy/jquery.tipsy.js @@ -33,6 +33,9 @@ $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity + if (this.options.className) { + $tip.addClass(maybeCall(this.options.className, this.$element[0])); + } $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); var pos = $.extend({}, this.$element.offset(), { @@ -78,9 +81,6 @@ } $tip.css(tp).addClass('tipsy-' + gravity); - if (this.options.className) { - $tip.addClass(maybeCall(this.options.className, this.$element[0])); - } if (this.options.fade) { $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}, 100);