I have an array in jQuery like this
var matches = [];
jQuery(".block").each(function() {
matches.push(this);
});
Now I want to use the matches array like this
var len = jQuery(matches).length;
for (var i = 0; i < len; i++){
function slider() {
jQuery(matches[i]).show("slow");
jQuery(matches[i]).animate({left:'+=730'},3000);
jQuery(matches[i]).show("normal", slider);
}
}
When I put number in the place of I, it works, but the for loop is not working. Please help me where the mistake.
each? But maybe I'm wrong... what are you actually trying to achieve?