I have the following problem: I have a form with three text input fields, and I want to change the background-color when one of the fields has focus, and get it set back whe
Tested Code:
$("input").css("background","red");
Complete:
$('input:text').focus(function () { $(this).css({ 'background': 'Black' }); }); $('input:text').blur(function () { $(this).css({ 'background': 'red' }); });
Tested in version: jquery-1.9.1.js jquery-ui-1.10.3.js