I\'m trying to create a div popup gallery type thing. But I\'m having an issue with my approach.
I have a few linked thumbnail images, which link to the lar
According to documentation, your id has do be unique in the page. If you want to have more HTML elements with that style (for exapmle), use class.
id = name [CS]:This attribute assigns a name to an element. This name must be unique in a document.
class = cdata-list [CS]:This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names. Multiple class names must be separated by white space characters.
Then when you select with jQuery that class you use $(".galImage").
$('.galImage').click(function(e){
e.preventDefault();
alert($(this).attr("href"));
});
Updated your jsFiddle.