There are much easier ways of doing this, but...
At first glance I would remove the quotes from style.display = .
Quotes are for strings and that is not a string.
But what is applied to the display is a string, so I would try this.
- Code: Select all
eval(currentPic + .style.display="none");
Scott