This topic is locked
[SOLVED]

 Auto Highlight

3/8/2013 7:51:30 AM
PHPRunner General questions
S
sickacid author

Hi is possible to do a function to auto-highlight a field when the user set it 'on focus' event?

D
danaci 3/10/2013

$('input:text').focus(

function(){

$(this).css({'background-color' : '#FFFFEEE'});

});

J
jackolantern 3/12/2013



$('input:text').focus(

function(){

$(this).css({'background-color' : '#FFFFEEE'});

});


Where to put this code?

S
sickacid author 3/13/2013

Put the code in the JavaScript onload event.
$('input:text').focus(

function(){

$(this).css({'background-color' : '#FFFF03'});

});
$('input:text').blur(

function(){

$(this).css({'background-color' : '#EEEEFF'});

});