Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jQuery Traversing - Ancestors

//parent()
$(document).ready(function(){
  $("span").parent();
});

//parents()
$(document).ready(function(){
  $("span").parents();
});

//parentsUntil()
$(document).ready(function(){
  $("span").parentsUntil("div");
});
 
PREVIOUS NEXT
Tagged: #jQuery #Traversing #Ancestors
ADD COMMENT
Topic
Name
2+6 =