var ary = ["foo1","foo2","foo3"]; for (var i = 0, len = ary.length; i < len; i++) { setTimeout(function(){ document.getElementById(ary[i]).style.display = "none"; },0); }
var ary = ["foo1","foo2","foo3"]; for (var i = 0, len = ary.length; i < len; i++) { setTimeout(function(){ document.getElementById(ary[i]).style.display = "none"; },0); }