Matches elements which contain the given text
<html> <head> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("div:contains('J')").css("text-decoration", "underline"); }); </script> <style> div { background:yellow; width:80px; height:80px; margin:5px; float:left; } </style> </head> <body> <div>Java</div> <div>C#</div> <div>JavaScript</div> <div>CSS</div> </body> </html>