We recently upgraded our jQuery to 1.9.0, but it broke our tipsy plugin. Its live
functionality now causes an error.
$('.tooltip, abbr').tipsy({
live: true
});
TypeError: this[binder] is not a function
Are there any fixes or patches for this? Googling didn't lead to anything useful.
UPDATE:
Thanks for the answers. I decided to try to fix the issue myself, because I couldn't find any patches.
Upon inspection the error seemed really easy to trace. The tipsy plugin can easily be patched to use the on
functionality instead of the deprecated live
functionality. In the tipsy plugin, I replaced the following code:
if (options.trigger != 'manual') {
var binder = options.live ? 'live' : 'bind',
eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
this[binder](eventIn, enter)[binder](eventOut, leave);
}
with:
if (options.trigger != 'manual') {
var eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
if (options.live)
$(document).on(eventIn, this.selector, enter).on(eventOut, this.selector, leave);
else
this.bind(eventIn, enter).bind(eventOut, leave);
}
Works like a charm. :)
jquery plugin conflict
– Novellathis.selector
from? – Glickthis.selector
is a property of the underlying jQuery object. – Ulund$(document)
with$('body')
and now, works like a charm. :) – Pronounced