I am not good at jQuery so I am not sure if my assumptions are corrent.
I am using the isotope plugin, with which I want to insert elements one by one (and not every
$("#items_are_here").find('.item').each(function( index ) {
setTimeout(function() {
$('#container').isotope( 'insert', $(this));
},3000);
});
in the above context, $(this)
is the window
object, because it's inside setTimeout
.
Modify your code to and try:
$("#items_are_here").find('.item').each(function( index ) {
var item = $(this);
setTimeout(function(index) {
$("#container").isotope( 'insert', $(this))
},index*3000);
});