I want to know if it’s possible to know if a user has let a page to load or he has clicked the X from Chrome or Firefox to stop it perfoce.
I have this code:
jQuery(window).load(function () {
if (condition == 1){
...
else
...
If user let to load the website until the end, first condition will comply.
If user forces to stop the loading, second condition will comply.
If user clicked X then that means most likely he didn’t load the jQuery library, or your code…
If you want check if the page is fully loaded then there is a trick that might help…
Put a div at the end of the page and bind the events to it when it’s ready
Edit: more over you can place your jQuery code at the end of the page…
Note : don’t forget don’t wrap your code with document ready because then it wont be fired…
Edit : hmm, I guess my ultimate solution is to do this …
Pretty dirty solution but what can i say this is all what can be done as far as i know…
As for your last comment, why do you want to check if he didn’t load the page ! all you need to do is check if the page is loaded and give him the prize
or bind the ajax call on the load of the image or the add that you want… as shown above…