Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

closest javascript

var el = document.getElementById('div-03');

var r1 = el.closest("#div-02");
// returns the closest parent element with the id=div-02
 
PREVIOUS NEXT
Tagged: #closest #javascript
ADD COMMENT
Topic
Name
5+7 =