I have a problem with isotope & wordpress. Im using an easy script which is not working when integrated into wordpress. I get the following error:
TypeError: $container.isotope is not a function”. This is the code:
jQuery(function($) {
/* ISOTOPE */
var $container = $('.flex-grid');
$container.isotope({
itemSelector: '.grid-item',
percentPosition: true,
isAnimated: false,
transitionDuration: 0,
masonry: {
columnWidth: '.grid-sizer',
}
});
});
The script is loaded in the side footer as the last script.
you need to import isotope.js scripts after importing jQuery
get it from here
https://isotope.metafizzy.co/#cdn