Jump to content

Onblur two element


unemployment

Recommended Posts

When click on the goals button the drop down list is displayed.  I want the both the drop down and the button to return to it's original (unclicked) state when click away from both the menu and the button.  Right now you can toggle the button, but if the menu is shown and you click outside of the menu, the menu won't disappear.  Please help make that happen. 

 

You can view my code snippet here. ..

 

http://jsfiddle.net/gxDK6/

 

 

Link to comment
Share on other sites

what might be a better solution is set a focus and blur action on a specific element like a div. wrap that div around the button and select so when your focused over the div (and anything in it) it will act like you want, when you leave the div (blur) it will do the other thing.. Just a thought, not sure if thats your exact notion being implied by your post but either way hope its helpful

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.