itemslide
itemslide copied to clipboard
jQuery.noConflict() - Cannot read property 'extend' of undefined
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 ?
You can load ItemSlide before loading jQuery with noConflict.
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.