lszanto Posted April 20, 2007 Share Posted April 20, 2007 I just need a simple script to hide some divs in an array this is what I got so far but I dunno why it doesn't work, can anybody help? function closeImg() { var num = new Array("one", "two"); var length = num.length; for(i = 0; i < length; i++) { var id = num[i]; document.getElementById(id).style.display = 'none'; } } Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/47830-solved-hiding-divs-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.