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 8429787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:26:01+00:00 2026-06-10T05:26:01+00:00

Demo: http://jsfiddle.net/nazym/1/ The code meant to show a popup when button pressed and hide

  • 0

Demo: http://jsfiddle.net/nazym/1/
The code meant to show a popup when button pressed and hide it when pressed anywhere else. The error happens when the button is clicked twice.
So the code should work on showing/hiding the popup when the button is clicked repeatedly.

  • 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-10T05:26:02+00:00Added an answer on June 10, 2026 at 5:26 am

    If you want to make it such that clicking the button shows the popup if it is hidden and hides it if it is shown (and clicking anywhere else hides it), it’s this block of your code that is causing the issue:

    if (ele == element) {
        hideDropDown();
        return;
    }
    

    You are not passing in any arguments to your hideDropDown function. It should be:

    hideDropDown(ele);
    

    That way, the onclick handler is properly added to the element.

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

Sidebar

Related Questions

Demo: http://jsfiddle.net/thisizmonster/VRPDa/ Purpose: Mouse must move to button position (button position must auto calculate)
Why Chrome does not show CSS ::-webkit-scrollbar scrollbar for iframe? Demo http://jsfiddle.net/laukstein/C9s3P/ <iframe scrolling=yes
The code: setInterval(doSomething(), 2000); function doSomething(){alert('hi')} demo: http://jsfiddle.net/PRff7/ I've been reading about this and
demo http://jsfiddle.net/bRqAR/2/ this code did not work on the internet explorer (check console). How
Im having a big headcache with a header design: Here the demo: http://jsfiddle.net/uGECm/ The
Please see demo here: http://jsfiddle.net/mA6qm/1/ (expand console) Why aren't events being sent or received
Please see the demo here: http://jsfiddle.net/Freewind/Vkp4U/ The html: <div class=outer> <div class=x>x</div> <div class=y>y</div>
Demo: http://jsfiddle.net/KTmNB/2/ How do I correct this so the middle divs are always in
Demo: http://jsfiddle.net/55ucw/1/ In any browser other than Safari or Chrome, I can tab into
Live demo: http://jsfiddle.net/9Y7Cm/1/ I want the text to be placed at the 50% of

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.