Correct hover syntex possibly mouseover
Hi there,
I'm brand new to jquery and would appreciate some help with the .hover syntax please. This is what I'm trying to do. When someone hovers with their mouse over a thumbnail image, I would like a larger photo in another location on the page to become visible. And when they move their mouse away/out I'd like the larger photo to be hidden. Right now the larger photo is set to be hidden as the page loads.
Because this is mixed in within lightbox css alone won't work for this example.
First I tried this but I believe I need to use show and hide and haven't been able to find an example that lets me do this with images that are not within the same div:
<div><img id="pic1" src="image1.jpg" /></div>
<div><img id="pic2" src="image2.jpg" /></div>
$(document).ready(function(){
$("#pic1 img").hover(function() {
$("#pic2").css("visibility","visible");
}, function() {
$("#pic2").css("visibility","hidden");
});
});
Thanks in advance.
ceAnn