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

  • Home
  • SEARCH
  • 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 7723361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:25:25+00:00 2026-06-01T04:25:25+00:00

So I have a weird problem. I have an <a/> tag that I am

  • 0

So I have a weird problem. I have an <a/> tag that I am applying a click event to using jQuery.on(). Here is where the problem happens. Every time I click on the <a/> tag, it seems that it adds another click event to the tag.

So I have an a tag like:

<a href="#" id="next-arrow" class="nav-arrows inactive"></a>

And here is my JS.

$('body').on('click', '#next-arrow', function(e) {
    if($(this).hasClass('active')) {
        $('body').addClass('loading-cursor');
        document.location.hash=step_names[current_step];
        $(this).removeClass('active').addClass('inactive');
        $('#tools').append(loader);
        $('#tools').find('.loader-outer').fadeIn('fast', function() {
                //Do some stuff here once the loader is faded in
        }); //End loader FadeIn()
    }   
    e.preventDefault();
});

That function is within a $(function() {});

Any idea one what might be happening? I have a bunch of JS code for other elements that aren’t related. However, if someone has an idea, and would like some other code up, let me know.

Thanks

PS. I would just like to add, that I went to make a jsFiddle thing to try and replicate, but I can’t replicate it. So I have no idea what the problem is

  • 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-01T04:25:27+00:00Added an answer on June 1, 2026 at 4:25 am

    Start Note: Do I add this answer here, or just mention in a comment?

    So I figured out the problem. I was appending the loader, and then fading in the loader using a class selector, then fading the loader out, but not removing the element from the DOM.

    So then the next time I called the function, it was appending the loader, fading it two loaders, and then for each loader, running the middle function, and so forth…

    So, once I loaded everything, I just removed the loader element from the DOM, and all is happy again.

    Thanks for the help anyway… I did learn a thing or two more about jQuery during my research…

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

Sidebar

Related Questions

I have a weird problem. i fetch some rows from database using: while($tag =
I have a weird problem that i can't figure out a solution for: I've
I have a weird problem. I'm using pscp.exe from within a C# program (with
I have a weird problem that sometimes when I make a change to a
I have a weird problem here. In short to the environment we have: There
I have a weird problem with routing. I have an existing website that I
I have a weird problem with HTML select box height in Firefox 2, here's
I have weird problem. I'm using Eclipse for writing J2EE (java, jsf, javascript) application
I'm having a weird problem. I have a div that is hidden via css
Here is the problem. I have multiple tag forms in my page. They are

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.