Friday, November 16, 2007

JQuery Interface.js issues.

We use the wonderful JQuery library when developing our site. Everything works fine, and with the new 1.2.x everything is super, super fast too.

But when we upgraded to the latest version of JQuery we started to get a very strange error :
jQuery.dequeue is not a function.

After som research it turns out this is due to compability problems with the interface.js library (used for nice visual effects) and the new JQuery version. You can read about it at this thread. However the thing is that JQuery has changed it's syntax for the dequeue function from : jQuery.dequeue(elem, effect);to:jQuery(elem).dequeue(effect);So before they fix this I just added a simple patch and now everything works fine :
/* Backwards compability to make JQuery to work with interface */
$.extend({ dequeue : function(elem, effect) {

Note: doing the (xxx)(JQuery) prevents us from getting a JQuery not defined error.