user1949940
user1949940

Reputation: 37

Modifying a jquery zoom on mouseover script

I am using this zoom on hover script http://www.jacklmoore.com/zoom/

I am trying to implement this into a gallery type page but the hover function seems to only work on the first image

<span class='zoom' id='ex1'>
<img src='http://i.imgur.com/y2qMsNn.jpg' width='555' height='320' alt='Daisy on the Ohoopee'/>
<p>Hover</p>
</span>
<span class='zoom' id='ex1'>
<img src='http://i.imgur.com/y2qMsNn.jpg' width='555' height='320' alt='Daisy on the Ohoopee'/>
<p>Hover</p>
</span>
<span class='zoom' id='ex1'>
<img src='http://i.imgur.com/y2qMsNn.jpg' width='555' height='320' alt='Daisy on the Ohoopee'/>
<p>Hover</p>
</span>    

Heres a demo of my situation http://jsfiddle.net/drhbt/

How can I have the script give every image the zoom function?

Thanks for your help!

Upvotes: 0

Views: 2096

Answers (1)

Ricardo Nu&#241;ez
Ricardo Nu&#241;ez

Reputation: 989

I couldn't do a better test, but I changed the id to a class and it worked.

$('.zoom').zoom();

Upvotes: 2

Related Questions