For some reason, click events on my real server take significantly more time than on my local development machine. For example, here is some basic code that I used as a test:
jQuery(document).ready(function(){
jQuery('a[rel^="foxyLightbox"]').on("click", function(e) {
console.log("HA!");
return false;
});
});
When I run it locally and click links, the text is displayed on the console pretty much instantly. If I click on it a bunch of times in a row, there will be no lag.
When I run it on my real server, there almost exactly one second is delayed before a fire occurs. If I click on it several times in a row, it means there is a lag, and it gives out about once a second.
Here is an example page https://www.foxytronics.com/products/68-springrc-sm-s4303r-continuous-rotation-servo
The link that triggers the event is an image of a large product in the upper right corner.
At first I thought the problem was in my javascript code, but then I commented on it and used the above test code (which is very short), so this cannot be. What can delay a click event when firing?
source
share