Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to find closest img tag in jquery

$('div.pinIt').click(function() {
        var url = $(this).closest('.showPin').find('img.lazy').attr('src');      
        alert(url);
    });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #closest #img #tag #jquery
ADD COMMENT
Topic
Name
4+3 =