html - Remove :focus with jquery

ID : 274310

viewed : 33

Tags : jqueryhtmlcssjquery





Top 4 Answer for html - Remove :focus with jquery

vote vote

94

You need to use the in-built blur and focus methods:

$(document).ready(function () {     $('#link').hover(function (){         $('form input[name=email]').blur();     }, function (){         $('form input[name=email]').focus();     }); }); 
vote vote

85

Try this:

$(document).ready(function () { $('#link').hover(function (){      $("input").blur();   }, function (){       //mouse leave   }); }); 

Working FIddle

vote vote

76

Try this:

$(document).ready(function () {     $('#link').hover(function (){         $('form input[name=email]').blur();           $('form input[name=email]').css("background-color","");          }, function (){         $('form input[name=email]').focus();          $('form input[name=email]').css("background-color"," yellow");            }); }); 
vote vote

67

Top 3 video Explaining html - Remove :focus with jquery







Related QUESTION?