Mega Code Archive

 
Categories / JavaScript Tutorial / JQuery
 

Matches all elements that have no children (including text nodes)

< html>   <head>     <script type="text/javascript" src="js/jquery-1.3.2.js"></script>     <script type="text/javascript">     $(document).ready(function(){          $("td:empty").text("Was empty").css('background', 'rgb(255,220,200)');     });     </script>   </head>   <body>       <table>           <tr><td>data</td><td></td></tr>       </table>   </body> </html>