adamhhh Posted March 29, 2007 Share Posted March 29, 2007 hi guys, im doing some css with a little bit of javascript which when you click on a link it shows a div which was previously hidden. It works fine by ID, but this will obviously only work for one ID. I have a lot of div classes which are dynamically generated with php, does anyone know how i would activate each one by class if that makes sense? E.g if ive got this javascript to show a div id- function show() { if (browserType == "gecko" ) document.poppedLayer = eval('document.getElementById(\'thumb_text3\')'); then its called here.. echo "<a href=\"#\" onClick=\"show()\">turn admin on</a>"; <div id='thumb_text3' style=\"visibility: hidden;\"> Link to comment https://forums.phpfreaks.com/topic/44755-get-css-element-by-class/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.