Home › Forums › JavaScript › On body click, hide search › Re: On body click, hide search
April 21, 2013 at 7:11 am
#132572
CrocoDillon
Participant
Pixelgrid beat me to it while writing the code:
var search = $(‘.search’);
$(‘.find’).click(function() {
search.slideDown(‘slow’).focus();
});
search.on(‘blur’, function() {
search.slideUp(‘slow’);
});
Only problem I’m trying to find the solution to is that when you click Find again it doesn’t hide it. This isn’t a big deal I think but it does play the animation again, which is weird.