I need to know how I can have multiple images, when clicked, call/setup a javascript pop-up.
here is my javascript:
$(document).ready(function() {
$('#my-link').click(function(e) {
e.preventDefault();
$('.offerlink').click(function() {
setTimeout('removegateway()', Delay*10);
});
setupgateway();
});
here is my image/caller:
<a href="http://www.google.com" id="my-link" onmouseover="over_image('img13');" onmouseout="off_image('img13')" style="position: absolute; top:362px; left: 364px;"/>
<img src="http://blah.png" border="0" name="img13"></a>
…it works fine when I put ‘id=”my-link”‘ next to one image, but when I try to put it next to more than one, only the first(first in the code) one call the pop-up. What do I need to change?
To trigger a function for all images you will have to use a
classinstead of anid: