Search
 
SCRIPT & CODE EXAMPLE
 

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);
    });
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript get url parameters 
Javascript :: replace array element javascript 
Javascript :: react router multiple path 
Javascript :: jquery remove items from dropdownlist 
Javascript :: draw line in javascript 
Javascript :: jquery change text 
Javascript :: object iterate in javascript 
Javascript :: get element by id in javascript 
Javascript :: ngchange angular 8 
Javascript :: for loop condition javascript 
Javascript :: javascript json decode 
Javascript :: npm for node types 
Javascript :: get value by name array from select in jquery 
Javascript :: get parent html js 
Javascript :: filter biggest value javascript object 
Javascript :: revert back to css 
Javascript :: form validation using jquery 
Javascript :: Uncaught TypeError: console.log is not a function 
Javascript :: es6 check if the object is empty 
Javascript :: radio button set value in javascript 
Javascript :: click outside javascript 
Javascript :: javascript run two functions at the same time 
Javascript :: javascript e.key 
Javascript :: FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory 
Javascript :: react native text span 
Javascript :: hello world using alert 
Javascript :: js sort numbers descending order 
Javascript :: eject expo app to android and react native 
Javascript :: sum of array elements in javascript 
Javascript :: install react router dom 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =