Is there any method in jQuery which gets called each and every time the page gets reloaded? If there is, how can I make use of that method in my JS file?
Asked
Active
Viewed 2,426 times
-2
-
[jQuery Learning Center](https://learn.jquery.com) – Andreas Jan 12 '17 at 11:03
-
1`$(document).ready(function() { /* your code here... */ })` – Rory McCrossan Jan 12 '17 at 11:04
-
MY requirement is different. I have a method and It should get called from $(document).ready(function(){ }). – Mahesh Jan 12 '17 at 11:11
-
So what's stopping you from calling the method in the document.ready? – JJJ Jan 12 '17 at 13:11
2 Answers
0
$(window).load(function() { ... })
whenever the user refreshes the page this function invokes, the code you want to execute can be placed inside the function

punith bp
- 174
- 1
- 12