jQuery: using hover to roll-over multiple images at once.
- by WillKop
I have a small problem, but I'm a bit stumped.
I am using the following code to do rollovers on my webpage
$("#mylink1 img").hover(
function()
{
this.src = this.src.replace("_off","_on");
},
function()
{
this.src = this.src.replace("_on","_off");
}
);
This works great for individual images, but I would like to roll over one of them and have the the other one change as well.
<a id="mylink1" href="about.cfm"><img src="images/Home_top_navs/aboutus_manage_off.gif" /></a>
<a id="mylink1" href="about.cfm"><img src="images/Home_top_navs/aboutus_nav2_off.gif" /></a>
Any help would be appreciated! Thank you!