Mega Code Archive

 
Categories / JavaScript Tutorial / JQuery
 

Adds a background and text color to all the headers on the page

< html>   <head>     <script type="text/javascript" src="js/jquery-1.3.2.js"></script>     <script type="text/javascript">         $(document).ready(function(){             $(":header").css({ background:'#CCC', color:'blue' });         });     </script>   </head>   <body>     <body>     <h1>Header 1</h1>     </body> </html>