itemslide icon indicating copy to clipboard operation
itemslide copied to clipboard

jQuery.noConflict() - Cannot read property 'extend' of undefined

Open CrucifixArnaud opened this issue 9 years ago • 2 comments

I have a mains scripts managing my javascript, using the jQuery.noConflict() to make sure there is no conflict with any other librairies loaded (and I don't have the total hand on which libraries are loaded).

When I initialize itemslider it throw this error

Uncaught TypeError: Cannot read property 'extend' of undefined

There is an example of my code.

var noConflictjQuery = jQuery.noConflict();
(function ($) {
    $(function () {
       'use strict';

       var carousel = $("#categoryFilterList");
       carousel.itemslide();
    });
})(noConflictjQuery);

If I remove the var jQuery.noConflict(); everything work's, but I can't really afford that. Any idea ?

CrucifixArnaud avatar Feb 23 '16 13:02 CrucifixArnaud

You can load ItemSlide before loading jQuery with noConflict.

nir9 avatar Mar 06 '16 20:03 nir9

This bug also affect me. I suggest ItemSlider developers to wrap all jQuery related code on a self executed function.

!function($) {
// Itemslide.js code
} (jQuery);

This will avoid problem for many users that uses another libraries with jquery.

iget-master avatar Oct 26 '16 20:10 iget-master