Javascript examples for jQuery:Tag Traversing
Find specific element in DOM tree
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(window).load(function(){/*from ww w. j a va 2 s.c om*/ console.log($('.feature_plus').parent().next('.my').html()) }); </script> </head> <body> <div class="span4"> <div class="feature_plus"> </div> </div> <div class="my"> <p>test 1</p> </div> </body> </html>