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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:11:17+00:00 2026-05-30T02:11:17+00:00

I have an anchor which is using jQuery .click event to start a few

  • 0

I have an anchor which is using jQuery .click event to start a few functions.

jQuery(document).ready(function(){  
    jQuery('a.slide_circ').click(function(){ 
        do_all_functions();
        return false; 
    });
});

This is the code in short..
Its working as it needs to, every click on anchor class slide_circ start do_all_functions.

But I have a problem there. If user make double clicks they run 2 times or more the functions…
And the how idea go to hell.

I think that I need to disable the double click some way or to set timeout on my function so its not running each time. Can anyone help me ?

  • 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-05-30T02:11:18+00:00Added an answer on May 30, 2026 at 2:11 am

    Use the .data method to assign the state to the element. Then, use setTimeout to reset the state:

    jQuery(document).ready(function() {
        jQuery('a.slide_circ').click(function() { 
            var $this = jQuery(this);
            if ($this.data('activated')) return false;  // Pending, return
    
            $this.data('activated', true);
            setTimeout(function() {
                $this.data('activated', false)
            }, 500); // Freeze for 500ms
    
            do_all_functions();
            return false; 
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an anchor on click of which I want to call jquery's jconfirm
I have two images with which I am using in an anchor tag. I
I have a MVC app and using JQuery. I have anchor that I setup
Using jquery I have a clicking tab mechanism that are nothing but anchor tags
I have a jQuery code which runs on dom ready. It also creates elements
How can I retrieve the full URL to which an anchor links using jQuery
I have a div, inside of which are a few anchor links: <div id=myDiv>
I have a small scraper where I need to click an anchor link using
Consider I have an anchor which looks like this <div class=res> <a href=~/Resumes/Resumes1271354404687.docx> ~/Resumes/Resumes1271354404687.docx
I have a HTML fragment which contains two anchor tags in various parts 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.