Mega Code Archive

 
Categories / JavaScript Tutorial / JQuery
 

Triggers the blur event of each matched element

< html>   <head>     <script type="text/javascript" src="js/jquery-1.3.2.js"></script>     <script type="text/javascript">         $(document).ready(function(){              $("input").blur(function () {                 $(this).next("span").css('color','red');              });         });     </script>   </head>   <body>     <body>        <p><input type="text" /> <span>blur fire</span></p>        <p><input type="password" /> <span>blur fire</span></p>     </body> </html>