Thanks for the feedback. I did try the altered for syntax and fixed the typo. Still get an object expected error on IE and nothin' on FF.
However, in the interim I figured out a fix that does nothing for my knowledge regarding how to close all open divs in a cross-browser way. Since my issue was I didn't really know what div had been opened recently, I decided to approach the problem from that direction.
I created...
User Profile
Collapse
-
Yes. There are numerous divs on the page, most of which are hidden when the page loads, but there is always at least one div displaying.
The page is a grid of thumbnail images. Clicking on one of the images "opens" the hidden div associated -- there is a larger image and relevant text and content associated with the thumbnail. Clicking on another image should close the first and open the second, etc. However, I wouldn't...Leave a comment:
-
Hiding multiple Divs cross-browser problem
Greetings, and thanks in advance for considering my problem.
I am working in a basic .htm page, in which I want to close all displayed DIVs with one event. In IE, I find that this works:
...Code:function closeAll() { var oDiv = new Enumerator(document.body.getElementsByTagName("DIV")); for(oDiv.moveFirst(); !oDiv.atEnd(); oDiv.moveNext()) { if (oDiv.item().style.display
No activity results to display
Show More
Leave a comment: