[thelist] Need some JS help - unobtrusive popup - based on CLASS not id.
Jon Hughes
hughesj at firemtn.com
Fri Jun 15 11:06:17 CDT 2007
Here's what I have so far:
function detpopup() {
if (!document.getElementsByTagName || !document.getElementById) return
false;
if (!document.getElementById('content').className == 'detpopupcont')
return false;
var detpopup = document.getElementById('content').className =
'detpopupcont';
detpopup.style.visibility='visible';
}
The HTML is like so:
<div id="content">
<div class="detpopupcont" style="visibility:hidden">This is hidden with
no javascript</div>
<div class="detpopupcont" style="visibility:hidden">This is hidden with
no javascript</div>
<div class="detpopupcont" style="visibility:hidden">This is hidden with
no javascript</div>
</div>
When the page loads, I want all of those to become "visibility:visible"
but this is my first bit of JS, and I need help :-/
- Jon
--------------------------------------------------
Btw, I found a solution for my previous problem:
...
I don't want to have <body onload="..."> - I don't mind adding the tag
with javascript, but I don't know how I would init that javascript
either...
...
More information about the thelist
mailing list