That depends. If your popup is a child-element of the overlay, then clicking
the popup will fire the click event of the overlay.
So you should make them sibling elements:

<div id="overlay"></div>
<div id="popup"></div>


-Hector


On Wed, Nov 19, 2008 at 9:40 AM, jonhobbs <[EMAIL PROTECTED]> wrote:

>
> Liam,
>
> That sounds interesting, presumably my popup will be the only thing
> with a z-layer higher than the overlay so the overlay wouldn't receive
> the click event if the popup was clicked?
>
> Jon
>
> On Nov 19, 5:28 pm, Liam Potter <[EMAIL PROTECTED]> wrote:
> > just also create a transparent fullpage overlay, so when a user clicks
> > on the page (actually the div overlay) you can do something like
> >
> > $("div.overlay").click(function () {
> >        $(".classname").hide();
> >
> > });
> > jonhobbs wrote:
> > > HI,
> >
> > > I'm trying to make a layer popup when you focus on a text box. That't
> > > the easy bit though and I've managed to do that.
> >
> > > I now want the layer to disappear if the user clicks anywhere on the
> > > page EXCEPT on the layer, or the textbox they clicked into.
> >
> > > I'm struggling to think of how to do this. I guess I could attach the
> > > click event to the page body then try to work out the co-ordinates
> > > that were clicked or something like that, but that seems a bad way to
> > > do it.
> >
> > > Any help would really be appreciated.
> >
> > > Jon
>

Reply via email to