Link to home
Start Free TrialLog in
Avatar of sabecs
sabecs

asked on

JQuery $(document).ready(function () not working on page refresh?

Hi,
I can't work out why the code below works when the page is first visited but not on a refresh/reload of the page?

Should I use window onload or something else?

      $(document).ready(function () {
            set_store_details();

      });
      
      
      
      function set_store_details(){
            
            alert("set_store_details");
      }
ASKER CERTIFIED SOLUTION
Avatar of SANDY_SK
SANDY_SK
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sabecs
sabecs

ASKER

Thanks SANDY_SK, error was caused by missing variable.