I'm trying to delay the each loop by using setTimeout.
$(".video_nav .item_container > .item").each(function() {
var button = $(this);
setTimeout(function(i) {
alert("test");
button.trigger("click");
},2000);
});
The alert or the click events aren't firing. Where did i go wrong? I want each loop iteration to be 2 seconds.