Knowledge Walls
Hyderabad, Andhra Pradesh, India
JQuery Traversing - Siblings in JQuery of JQuery

Traversing Sideways in The DOM Tree

There are many useful jQuery methods for traversing sideways in the DOM tree:

  • siblings()
  • next()
  • nextAll()
  • nextUntil()
  • prev()
  • prevAll()
  • prevUntil()
<!DOCTYPE html>
    <html lang="en-US">
        <meta charset="UTF-8">
        <script   src=""   integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="   crossorigin="anonymous"></script>
                  $(".class1"). find(".students").next().css("color","red");
        <div width="500" height="300" style="background-color: orange;">
            <div class="class1">
            <ul class="teachers">
            <ul class="students">
            <ul class="office">
        <button id="btn">click here</button>
Next Topics
Next lessons of current book.
JQuery of JQuery
JQuery of JQuery
Previous Topics
Previous lessons of current book.
Best Lessons of "JQuery"
Top lessons which are viewed more times.
JQuery of JQuery
JQuery of JQuery
JQuery of JQuery
JQuery of JQuery
JQuery of JQuery
JQuery of JQuery
JQuery of JQuery
  Copyright © 2014 Knowledge walls, All rights reserved
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details