Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
179
rated 0 times [  180] [ 1]  / answers: 1 / hits: 49812  / 12 Years ago, mon, april 2, 2012, 12:00:00

unload function in jQuery works fine in Firefox but not in chrome and safari. please check this fiddle in chrome and Firefox. http://jsfiddle.net/jeevankk/Gywnw/2/ . Alerts a message when the page is refreshed.



$(window).unload(function() {  
alert(Unload);
});​

More From » jquery

 Answers
7

I found Joseph's comment as the correct answer, So posting this answer.



Dialogs are blocked/prevented during beforeunload (with exception to the beforeunload prompt) and unload events. Can be confirmed by checking your console.


[#86469] Friday, March 30, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
anthonyw

Total Points: 589
Total Questions: 117
Total Answers: 117

Location: Dominican Republic
Member since Sun, Sep 4, 2022
2 Years ago
;