Other have offered solutions where you hide the links, etc.
A variation of that theme would be to originally display the links
with some inline JS, e.g.,

<a href="mysite.html" onclick="myPrematureClickSentinel()">

Where myPrematureClickSentinel simply returns false.

In your document.ready()

$("a").removeAttr("onclick"); // get rid of all
myPrematureClickSentinel
$("a").click( function() {
    // your actual click handler goes here.
});

You could chain those if you want.

Of course as James pointed out this will not work if the user has JS
turned off...

On Mar 20, 9:48 am, HippieX <jlrober...@gmail.com> wrote:
> I have a problem I am sure others have encountered.  I have .click()
> events attached to <a> links in my web page, but the user is clicking
> the links before the document.ready(); fires causing unexpected
> results.  Is there anyway to stop this from happening?
>
> Thanks,
>
> Jeff

Reply via email to