Search code examples
jquerymagentoprototypejs

Prototype and jQuery Issue this._each is not a function


I am developing a Magento Website and I am getting an error in IE7+8 + an error in my firebug console:

this._each is not a function
[Break On This Error]   
this._each(function(value) {

I have noConflict on the jQuery include and this makes no difference, all of my scripts still function as they should but if you look at the code on the website and remove idTabs.js the error disappears... Im really stumbled by this and have spent over an hour now trying to figure it out!

http://www.haircarepro.co.uk

Any help would be deeply appreciated! Thanks for your time.


Solution

  • The problem appears to be the each function in the idtabs.js plugin on line 63. It appears to be looking for a Prototype function called each instead of a jQuery one.

    try changing :

    return this.each(function(){ jQuery.idTabs(this,s); }); //Chainable
    

    to

    return jQuery(this).each(function(){ jQuery.idTabs(this,s); }); //Chainable
    

    To use the each function of jQuery instead of trying to find it in Prototype.js