JavaScript & jQuery Tutorial for Beginners – 8 of 9 – jQuery Traversing




http://www.LittleWebHut.com
jQuery Traversing. This tutorial demonstrates jQuery Traversing. This is a good tutorial for beginners.

Link to the code used in this video.
http://www.littlewebhut.com/javascript/jquery_traversing/

jQuery website
http://jquery.com

Original source


24 responses to “JavaScript & jQuery Tutorial for Beginners – 8 of 9 – jQuery Traversing”

  1. I've been watching all jQuery series of yours. Thanks. I got kinda dumb/mean question. What are practical applications regarding sibling etc ? Are they in use in rather complex sites ?

  2. first() Get the first selected element:

    $(document).ready(function() {
    $("h1").click(function() {
    $("p").first().css("background-color", "red");
    });
    });

    Can you please tell me how to make the corresponding h1's first "p" to be made red??
    like:

    $("h1").click(function() {
    $(this).first(p).css("background-color", "red");
    });

  3. i agree. you are a very good teacher. i watched the 9 part series maybe 4 or 5 times, each time narrowing it down to fewer and fewer towards the end. today i applied part of vid #8 to a problem i have been having on my website for months, and it resolved it.
    now that is teaching.

  4. 5:50 for this particular example you could also use the adjacent selector $("h1 + div") to only select divs that immediately follow an h1. .next() and .prev() are obviously much more powerful but using either is fine.

    thank you for creating such an ideal video tutorial series on jQuery. jQuery offers so much potential that it's hard to see myself in web programming in tomorrow's internet without it.

Leave a Reply