$('#photo-list li a').click(function () {
var id = $(this).attr('id');
});
<ul id="photo-list" class="upload-photo-list" style="">
<li>
<a id="link1">
<img src="" />
</a>
</li>
<ul>
ASKER
jQuery (Core) is a cross-browser JavaScript library that provides abstractions for common client-side tasks such as Document Object Model (DOM) traversal, DOM manipulation, event handling, animation and Ajax. jQuery also provides a platform to create plugins that extend jQuery's capabilities beyond those already provided by the library.
TRUSTED BY