find and elements like this <p>text</p> - Javascript jQuery

Javascript examples for jQuery:Text

Description

find and elements like this <p>text</p>

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <script src="https://code.jquery.com/jquery-latest.js"></script> 
 </head> //from  w ww  .  j a va 2s  .c  o m
 <body> 
  <div>
    AAA 
  </div> 
  <div>
    VVV 
  </div> 
  <div>
    QQQ 
  </div> 
  <div>
    RRR 
  </div> 
  <script>
$("div:contains('AAA')").css("text-decoration", "underline");
    
      </script>  
 </body>
</html>

Related Tutorials