I put an example of what I am trying to do here:
http://www.brilliantretail.com/cases/colors/ Example
basically, I the box to appear when the image with the down arrow is clicked
and disappear if the user clicks anywhere else on the screen.
Thanks, David
blemming wrote:
>
> I'm trying to create a few drop down option menus that are contained in
> divs which are initially not displayed. There each have a image dropdown
> image with class = div_color. Here is how I am opening the boxes and
> closing any others that were left open.
>
> $(".box_color").click(function ()
> {
> $(".div_color").hide();
> $(this).next().show();
> }
> )
>
> My question is how do I create an event that will hide() the divs if the
> user clicks anywhere else on the screen? I'm new to jQuery so I'm
> thinking something along these lines might work but I don't know how to
> properly write the css selector.
>
> // DOESN"T WORK
> $('body:not(".div_color")').click(function(){
> $(".div_color").hide();
> }
> )
>
> Thanks for your help! David
>
--
View this message in context:
http://www.nabble.com/Help-with-drop-down-menus-tf2821960.html#a7880611
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/