阅读背景:

jQuery .click()函数中的远程Ajax调用在进入下一页之前不会结束

来源:互联网 

I need to send click information on my website to a third party server using ajax (json). I am using jquery and I added the click event to certain links. In the click event I am making a json request to a remote server with the location of the click (heat map) and some other information. The problem is that the ajax function doesn't fire in time before the default link action happens. Setting async to false doesn't seem to work on remote ajax calls. I have tried preventDefault(), but then I don't know how to run the default action after the successful ajax call. Here is what I want to do:I need to send click information on my website




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: