jQuery ?? - ????
jQuery Traversal - Siblings
Sibs? ??? ?? ??? ????.
jQuery? ???? DOM ???? ??? ?? ??? ??? ? ????.
DOM ??? ?? ??
DOM ??? ???? ??? ? ?? ??? ???? ?? ????:
siblings()
next()
nextAll()
nextUntil()
prev()
prevAll()
prevUntil()
jQuery siblings() ???
siblings() ???? ??? ??? ?? ?? ??? ?????.
?? ???? <h2>? ?? ?? ??? ?????.
Example
$(document).ready(function(){ $("h2").siblings(); });
??? ????? ???? ?? ?? ??? ???? ?? ????.
?? ???? <h2>? ?? ??? ?? <p> ??? ?????.
Instance
$(document).ready(function(){ $("h2").siblings("p"); });
jQuery next() ???
next() ???? ??? ??? ?? ?? ??? ?????.
? ???? ??? ??? ?????.
?? ???? <h2>? ?? ?? ??? ?????.
Example
$(document).ready(function(){ $("h2").next(); });
jQuery nextAll() ???
nextAll() ???? ??? ??? ?? ?? ??? ?? ?????.
?? ???? <h2>? ?? ?? ??? ?? ?????.
Example
$(document).ready(function(){ $("h2").nextAll(); });
jQuery nextUntil() ???
nextUntil() ???? ??? ? ?? ?? ??? ?? ?? ?? ??? ?? ?????.
?? ??? <h2> ??? ?? ?? ??? ?????. prevAll() ? prevUntil() ???? ? ???? ???? ????? ?? ?????. ???? ?? DOM ??).