[jQuery] Stop .blur() on tabbing out.

[jQuery] Stop .blur() on tabbing out.


Hi everyone,
I'll post the code first and then ask my question...
$('input, select, textarea').change().focus(function(){glow
(self)}).blur(function(){stopGlow()})
function glow(){
var myCols = [{param:'background-color', fromColor: '#222',
toColor: 'random', random: true}]
$('#front').colorBlend(myCols);
}
function stopGlow(){
var myCols = [{action: 'stop'}]
var myCols2 = [{param: 'background-color', toColor: '#222',
isFade: false, cycles: 1}]
$("#front").colorBlend(myCols).colorBlend(myCols2);
}
so...i have my form, and i want the function glow() to happen when an
input is focused. Then when it unfocuses stopGlow() should happen.
This all works perfectly, but, when you tab from input 1 to input to
stopGlow() occurs then glow() occurs.
The problem with this is that i want glow() to just carry on when any
input is focused. Using something like:
if($("input").is(":focus")){return false;} doesn't work, so i'm not
sure what to do.
I hope you understand my question and can help!
Wmonk