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. Quote Link to comment 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')"> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.