Permalink
Browse files

Reorder function declaration tipOut() and tipOver(), fix javascript bug.

  • Loading branch information...
noomz committed Jan 6, 2012
1 parent bff3301 commit f2a2addf0047e9f6f253c1a59108cf2a4c26eceb
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/javascripts/jquery.tipsy.js
@@ -26,11 +26,6 @@
$tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
$tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);
-
- if (this.options.hoverable) {
- $tip.hover(tipOver, tipOut);
- }
-
var that = this;
function tipOver() {
that.hoverTooltip = true;
@@ -43,7 +38,11 @@
that.$element.trigger(eventOut);
}
}
-
+
+ if (this.options.hoverable) {
+ $tip.hover(tipOver, tipOut);
+ }
+
var pos = $.extend({}, this.$element.offset(), {
width: this.$element[0].offsetWidth,
height: this.$element[0].offsetHeight

0 comments on commit f2a2add

Please sign in to comment.