Jump to content

[SOLVED] Hiding divs help.


lszanto

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.