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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:04:36+00:00 2026-06-13T03:04:36+00:00

When I click my links using the onmousedown event I have to double click

  • 0

When I click my links using the onmousedown event I have to double click them for them to toggle. I am not understanding why this is so.

function toggleInteractContainers(x) {
//the 'x' variable represents the add friend/message container value
        if($('#'+x).is(":hidden")) {
        //if the container is hidden then we will slide it down and show it
            $('#'+x).slideToggle(400);

        } else {
            //if its not being hidden then we will hide it
            $('#'+x).hide();
        }
        //this just means we have to hide all the containers
        $('.interactContainers').hide();
}

I’m calling it from this div

<div class ="interactionLinksDiv">
           <a href="#" onclick="return false" onmousedown="toggleInteractContainers('add_friend');">Add Contact</a>
</div>          
<div class ="interactContainers" id ="add_friend">
  <div align ="right"><a href="#" onclick= "return false" onmousedown = "toggleInteractContainers('add_friend')">cancel</a></div>
                Add as a contact? &nbsp;
  <a href ="#" onclick="return false" onmousedown="javascript:addAsFriend(); ">Yes</a>  
</div>

I’m not getting any errors which is frustrating. I’d greatly appreciate it if I was told why this happened and what I could do to prevent it from happening again. Any programming tips along the way would be awesome as well.

  • 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-13T03:04:38+00:00Added an answer on June 13, 2026 at 3:04 am

    Working demo Minor changes done: http://jsfiddle.net/FGqE7/

    Please let me know if I missed anything!

    Hope it fits the cause :)

    Code

    function toggleInteractContainers(x) {
        //the 'x' variable represents the add friend/message container value
        if (!$('#' + x).is(":visible")) {
            //if the container is hidden then we will slide it down and show it
            $('#' + x).slideDown(400);
    
        } else {
            //if its not being hidden then we will hide it
            $('#' + x).hide();
        }
        //this just means we have to hide all the containers
       // $('.interactContainers').hide();
    }​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like links to be trigger on double click. Something simple like this:
We are using event click to catch click on links and load content via
I'm attempting to disable links clicked. I have an onmousedown event listener attached as
I am trying to block click on links using jQuery blockUI plugin. It's seems
I am new to using AutoIt. I have been struggling to click a link
i create some links on the fly ... $('input[name=iplus]').click(function() { $(ol).append(<a href='#' title='delposition' class='beschr-+($(#billsumary
Want to attach an Event Handler/Listener to some links using the delegate() method, but
I run a small webpage that allows users to click on various links using
i'm having a problem with sliding divs using jquery. If I click the links
I have links that are present as <div> images with click events getting passed

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.