Binding click to a repeated div ID
<p>I'm trying to create a <code>div</code> popup gallery type thing. But I'm having an issue with my approach.</p>

<p>I have a few linked thumbnail images, which link to the large image.
Each of these images looks like so</p>

<pre><code>&lt;a href="www.google.com" id="galImage"&gt;
&lt;img src="http://www.savoryspiceshop.com/content/mercury_modules/cart/items/3/0/3/3030/rogan-josh-salt-free-thumbnail-fw232.jpg"&gt;
&lt;/a&gt;
&lt;br /&gt;
&lt;a href="www.yahoo.com" id="galImage"&gt;
&lt;img src="http://www.savoryspiceshop.com/content/mercury_modules/cart/items/2/9/8/2986/italian-herbs-salt-free-thumbnail-fw232.jpg"&gt;
&lt;/a&gt;
</code></pre>

<p>As you can see, each  has the same id of "galImage". I didnt want to create a separate ID for each as sometimes there might be 2 image and sometimes there might be 20. So just thought simply checking to see if #galImage get's clicked i'd run some jquery.</p>

<p>My issue is, that only the very first occurence of #galImage triggers the jquery, every other instance fails.</p>

<p>Here's a JSfiddle with the above example. <a href="http://jsfiddle.net/MH6eJ/1/" rel="nofollow">http://jsfiddle.net/MH6eJ/1/</a>
Click image 1, it works. But image 2 fails.</p>

<p>How can I accomplish this?</p>
