Please answer, thanks
next() function scans the HTML and looks for the next sibling of the current element in the HTML. So,
<div class="one"> <!-- current element --> <p>text...</p> </div> <div class="two"> <!-- this is .one's next sibling, so .next() == this <div> --> <p>text...</p> </div>
There's not much to it
how do you program if there is no more next sibling (like .next()=null) and you want to select back the very first sibling
@jhepong This lesson teaches you how to do exactly that Keep working through the exercises, and you'll see
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.