-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
  • 331,213
  • 40
  • 305
  • 339
Mahesh
  • 35
  • 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,453
  • 2
  • 11
  • 28