Ok, I see how this is working, but... if you click on the target div it triggers the close also. Is there a way to 'tell' the target that when it's open, all underlying divs are disabled?
On 16 nov, 10:29, Feijó <[EMAIL PROTECTED]> wrote: > Can you provide an code of your attempt? > > It may be simple, or not. Depend on your page. > > You could set a master div, then just bind a click event on it to hide the > target div > > <div id=master> > <div id=target> > target content > </div> > master content > </div> > > <script> > $('#master).click(function() { > $('#target).fadeOut('slow');}); > > </script> > > Feijó > > ----- Original Message ----- > From: "Codex" <[EMAIL PROTECTED]> > To: "jQuery (English)" <jquery-en@googlegroups.com> > Sent: Friday, November 16, 2007 2:45 AM > Subject: [jQuery] Close/hide div on click outside > > > I've searched the posts and the web but I can't find a clear answer/ > > solution. I hope someone can answer this one: > > > I want to hide a div when there's a click anywhere outside of the div. > > How would one do this? > > > Gav