I'm a beginner to JavaScript.
My goal is to take this CSS Image Hover script and convert it into a JavaScript onClick script.
Normally I can find solutions on my own but in this particular case I need the communities help.
So again the goal is to convert the code below into an identical Java Script code. I would like the
thumbnail images to Show Larger Image onClick and to close Larger Image onClick. (No resize on
Larger Image). Thank you in advanced to anyone who can help out.
Code:<style type="text/css"> .verdana { font-family: Verdana, Geneva, sans-serif; } body,td,th { font-family: Verdana, Geneva, sans-serif; font-size: 12px; } .thumbnail{ position: relative; z-index: 0; } .thumbnail:hover{ background-color: transparent; z-index: 50; } .thumbnail span{ /*CSS for enlarged image*/ position: absolute; background-color: ; padding: 0px; left: -1000px; border: solid; visibility: hidden; color: black; text-decoration: none; } .thumbnail span img{ /*CSS for enlarged image*/ border-width: 0; padding: 0px; } .thumbnail:hover span{ /*CSS for enlarged image on hover*/ visibility: visible; top: -150px; left: 170px; /*position where enlarged image should offset horizontally */ } </style> <p><a class="thumbnail" href="#thumb"><img src="http://imageshack.com/scaled/large/845/iv8h.jpg" width="178" border="1" /><span><img src="http://imageshack.com/scaled/large/20/u8c9.jpg" /><br />Actual Photo</span></a></p> <p><a class="thumbnail" href="#thumb"><img src="http://imageshack.com/scaled/large/35/6wid.jpg" width="178" border="1" /><span><img src="http://imageshack.com/scaled/large/41/eis9.jpg" /><br />Actual Photo</span></a></p>



Reply With Quote


Bookmarks