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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:40:54+00:00 2026-05-15T21:40:54+00:00

I’m using jQuery to bind to all links on the page (I’m using the

  • 0

I’m using jQuery to bind to all links on the page (I’m using the ‘click’ event, but have tried various combinations of ‘mousedown’ and ‘mouseup’,together with bind() and live() to no avail).

I can intercept the click no problem (with all the above methods). What I am trying to do is send some data via a GET request, and when it completes, allow the default click action to proceed.

Since I am communicating across-domain, I must use GET rather than POST, and so cannot make a synchronous call.

Therefore I have to return ‘false’ from the intercepted click event, store the event for later, then manually fire it again once the communication has completed. If I return true, the communication gets cut off mid-way as the page location changes.

The problem is, I can’t find a way to fire the native click event later on.

var storedEvent;
$("#wrapper a").bind('click', function(event, processed) {
    $(event.target).unbind('click'); // temporary to make code branching easier
    storedEvent = event.target;
    event.stopPropagation();

    $.ajax({
        dataType: 'jsonp',
        data: linkData,
        jsonp: 'cb',
        url: 'xxx',
        cache: false,
        complete: function(response) {
            // How do I now go back and fire the native click event here?
            $(storedEvent).click();
        }
    });
    return false;
}

I’ve tried using click() and trigger() where indicated, but neither worked.

I know the submission is succeeding, and the code is branching correctly — I have debugged that far. I just don’t seem to be able to replay the event.

Note that I can’t do something simple, like store the href and set window.location later — some of the links have their own onClicks set, while others have various targets specified. I’d ideally like to just replay the event I stopped earlier.

I started off using event delegation with live() and had everything working, apart from this — I have simplified it down to a bind() in order to simplify 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-05-15T21:40:55+00:00Added an answer on May 15, 2026 at 9:40 pm

    You cannot trigger a click event on an anchor and get it to follow the href cross browser.

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

Sidebar

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.