Finding text value after a certain div using jQuery - Javascript jQuery

Javascript examples for jQuery:Text

Description

Finding text value after a certain div using jQuery

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.5.2.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){/*from w ww  . ja  va  2 s.  c o m*/
console.log($('.my').parent().text());
    });

      </script> 
 </head> 
 <body> 
  <div class="my suffix_2"> 
   <input type="text" name="reward_set-0-for_every" id="id_reward_set-0-for_every"> 
  </div> 
  <br> Help text for this particular field  
 </body>
</html>

Related Tutorials