Simple onmouseover/onmouseout event
Here is the base code:
<body>
<div class="gallery" align="center">
<h3>Simple and Effective Photo Gallery with HTML and JavaScript</h3><br/>
<div class="thumbnails">
<img onmouseover="preview.src=img1.src" id="img1" src="http://blahblahblah" alt="Image Not Loaded"/>
<img onmouseover="preview.src=img2.src" id="img2" src="http://blahblahblah" alt="Image Not Loaded"/>
<img onmouseover="preview.src=img3.src" id="img3" src="http://blahblahblah" alt="Image Not Loaded"/>
<img onmouseover="preview.src=img4.src" id="img4" src="http://blahblahblah" alt="Image Not Loaded"/>
<img onmouseover="preview.src=img5.src" id="img5" src="http://blahblahblah" alt="Image Not Loaded"/>
<img onmouseover="preview.src=img6.src" id="img6" src="http://blahblahblah" alt="Image Not Loaded"/>
</div><br/>
<div class="preview" align="center">
<img id="preview" src="http://blahblahblah" alt="No Image Loaded"/>
</div>
<br/>
</div>
</body>
I can post the CSS for the page, but it's really just simple styling; borders, colors, etc.
I have tried using a <span> on the title text, and using the same onmouseover code to point to one of the other 6 images, and that works (I could live with this as an option), but it's not loading the original image. I think it WOULD work if I could ID the original in the same manner as the other images, but I can't find a way to make that work properly.
There is no <script> tag in the head, if that matters, but it doesn't seem to affect the functionality of the page.
I'm also open to using CSS if there is a simple solution in that area.
Wordpress is out. Please don't suggest it. Thanks.
Any ideas? Thanks in advance!
-
andrejvasso -
Thanks
{{ DiscussionBoard.errors[3903001].message }} -
-
Aronya -
Thanks
{{ DiscussionBoard.errors[3903114].message }} -
-
andrejvasso -
[ 1 ] Thanks
{{ DiscussionBoard.errors[3903245].message }} -
-
Aronya -
Thanks - 1 reply
{{ DiscussionBoard.errors[3903410].message }}-
andrejvasso -
Thanks
{{ DiscussionBoard.errors[3903452].message }} -
-