Hi Dan,

Use the "alt" tag of your image to store your alternative path.

If you're not a XHTML valid integrist, you can also use your own
attributes.
<img id="imgLinkAct" src="images/cylinder.jpg" altSrc="images/
valve_manifold.jpg" />

:)
Jay

On 18 juil, 21:22, Danjojo <[EMAIL PROTECTED]> wrote:
> I have a crude demo working when I hover over a link an image above is
> switched out.
>
> How do I best store what image I want the link to swap to?
>
>         $(".showPic").hover(function() {
>                 $("#imgLinkAct").attr("src", "images/valve_manifold.jpg");
>         });
>
> The html:
> <p class="centered" style="height: 80px;"><img id="imgLinkAct"
> src="images/cylinder.jpg"/></p>
> <p style="margin-left: 2%;">
> <a href="linear_actuators.html">Linear Actuators</a><br/>
> <a href="#" class="showPic">Guided Actuators</a><br/>
> <a href="#">Grippers &amp; Escapements</a><br/>
>
> Would I store the img path in the <a> tags title attribute?
>
> I would like to not hard code it in the jquery/script..

Reply via email to