tipsy live does not work with jQuery 1.9.0 -


we upgraded our jquery 1.9.0, broke our tipsy plugin. live functionality causes error.

$('.tooltip, abbr').tipsy({     live: true });  typeerror: this[binder] not function 

are there fixes or patches this? googling didn't lead useful.


update:

thanks answers. decided try fix issue myself, because couldn't find patches.

upon inspection error seemed easy trace. tipsy plugin can patched use on functionality instead of deprecated live functionality. in tipsy plugin, replaced 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 charm. :)

you need include jquery migration plugin, since using live:true make use of jquery.live removed in jquery 1.9.

for backward compatibility have created migration plugin can downloaded here , include migration plugin add support removed methods , utilities.

i doing like

if (options.trigger != 'manual') {     var eventin  = options.trigger == 'hover' ? 'mouseenter' : 'focus',         eventout = options.trigger == 'hover' ? 'mouseleave' : 'blur';     if(options.live){       $(this.context).on(eventin, this.selector, enter).on(eventout, this.selector, leave);     } else {       this.on(eventin, enter).on(eventout, leave);     } } 

Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -