-2

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?

Rory McCrossan
  • 319,460
  • 37
  • 290
  • 318
Mahesh
  • 25
  • 1
  • 8

2 Answers2

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
0

you can use: $(function(){ /* your code here */ });

mickaelw
  • 1,342
  • 2
  • 10
  • 26