Find specific element in DOM tree - Javascript jQuery

Javascript examples for jQuery:Tag Traversing

Description

Find specific element in DOM tree

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials