diff --git a/src/javascripts/jquery.tipsy.js b/src/javascripts/jquery.tipsy.js index f95c063..74b0e9a 100644 --- a/src/javascripts/jquery.tipsy.js +++ b/src/javascripts/jquery.tipsy.js @@ -174,10 +174,15 @@ if (!options.live) this.each(function() { get(this); }); if (options.trigger != 'manual') { - var binder = options.live ? 'live' : 'bind', - eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', + var eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; - this[binder](eventIn, enter)[binder](eventOut, leave); + + if (!options.live) { + this['bind'](eventIn, enter)['bind'](eventOut, leave); + } else { + $(this.context).on(eventIn, this.selector, enter); + $(this.context).on(eventOut, this.selector, leave); + } } return this;