On Field focus add/remove class in form


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $(document).ready(function(){
  2. $('.normal').focus(function() {
  3. //alert("calling")
  4. $(this).removeClass("itl");
  5.  
  6. });
  7. $('.normal').blur(function() {
  8. $(this).addClass("itl");
  9. });
  10. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.