I'm trying to trigger an opacity animation on a menu when the search input is focused, and when it is not focused for that menu to return to opacity:1.
My botched code below.
if($('input#edit-keys-2').is(":focus")){
$('#zone-header ul#nice-menu-1').animate({opacity:0}, 300);
}else{
$('#zone-header ul#nice-menu-1').animate({opacity:1}, 300);
}
Use .focus() and .blur() like this instead