I have a UL with an LI inside of it, when i click on the UL, the LI inside of it fades in. The Li has an input inside of it (search form), next to it i have a select input to select the section of the website you want to search.(both inside of the LI)
I'm trying to get it so that when focus leaves the LI and everything inside of it(select input, search input), it fades out. BUT, right now my code makes it so that when you click the UL to fade in the LI, it fades in, and then i click on the search input, but when i click on the other input inside of the LI(select input), the LI will flash, then if i click back on the search input, the LI will fade out... GAH! i just want the LI to fade out when it and everything inside of it all DO NOT have focus anymore. Any help would be greatly appreciated.
html:
<ul class="ulsearch">
<li class="lisearch">
<input type="text" id="search" />
<select>
<option>EVERYTHING</option>
<option>MUSIC</option>
<option>VIDEOS</option>
</select>
</li>
</ul>
jquery:
$('.ulsearch').click(function() {
$('.lisearch').fadeIn(100);
});
$('.lisearch').focusout(function() {
$('.lisearch').fadeOut(100);
});