Padgoi Posted February 23, 2008 Share Posted February 23, 2008 Hey fellas, I'm looking for a short javascript function that would display an image and when I clicked the image, it would display another div I already have written. Any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/92620-onclick-display-div/ Share on other sites More sharing options...
php7Q Posted February 23, 2008 Share Posted February 23, 2008 <script language="javascript"> function doStuff(DIVID) { document.getElementById(DIVID).style.display="block"; } </script> <div id="myDIV"> Content Here </div> <img src="whatever.jpg" onclick="doStuff('myDIV')"> Link to comment https://forums.phpfreaks.com/topic/92620-onclick-display-div/#findComment-474797 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.