jquery loop not triggering jquery functions
I searched through stackoverflow and various other sites and can't seem to
get an answer to this dilemma.
My aim is to have jQuery functions applied to divs in succession using an
array with div id's.
I have the following code that isn't working for some reason:
$(document).ready(function(){
$('#click').click(function(){
var layout_list = ['1','2','3','4','5','6','7','8','9','10'];
load_delay = 50;
for (i = 0; i < layout_list.length; i++ ) {
load_delay = load_delay+50;
setTimeout(function(){
$("#l_"+layout_list[i]).css("visibility","visible");
$("#l_"+layout_list[i]).addClass("bounceIn");
},load_delay);
}
});
});
No comments:
Post a Comment