Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7990545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:02:51+00:00 2026-06-04T13:02:51+00:00

As above, I have a button that, when clicked, will open the sub-menu. For

  • 0

enter image description here

As above, I have a button that, when clicked, will open the sub-menu. For each option in the sub-menu there are three elements (there’s actually more I think, but will keep it as 3 for simplicity). I give focus to the main div (white ‘frame’) of the sub-menu. Onblur of this div – I then hide the sub-menu.

This all behaves as expected – but I have the probem that when one of the 3 elements for a particular option are clicked (i.e. given focus), the main div will close due to it’s onblur event handler – and the PopUp function that’s linked to the onClick event of the elements for the options in the sub-menu are not fired/reached.

I need someway of only handling the onblur event of the main div in this way if the options haven’t been clicked.

I have JQuery to use obviously so I’m more than happy to work with that to solve the problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:02:53+00:00Added an answer on June 4, 2026 at 1:02 pm

    I’m going to post this answer – in the hope that someone can improve on it or suggest an alternative because it really does feel like a work around.

    But, what I’ve done is on the onblur event – instead of instantly hiding the div, I’ve put in a small delay using a timeout so I don’t alter the precedence of the onblur/onclick events fired but in effect give the onclick ‘a chance’ to fire.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a button that when clicked sets the text in an input text
I have 2 divs above each others, at a given moment one is shown
I have a folder \folder\ above the webroot that contains .php , .inc ,
I have a WPF application that has just one button. When the button is
I have a few links on my site that will need to show a
In a web page I have a button when clicked it calls a JavaScript
I have button. I have expander in button and label above expander in the
-I have a UIView. -This UIView has a UIButton that when clicked makes a
<input type=Checkbox checked= name=new> if I have the above html in a document, how
my $str=1:2:3:4:5; my ($a,$b)=split(':',$str,2); In the above code I have used limit as 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.