views:

28

answers:

1

The JavaScript script works with Chrome and Firefox but not in Safari. The code is:

  $(document).ready(function(){
     $(window).load(function() {
        myVariable.start();
     });

This generates:

  ReferenceError: can't find variable: myVariable  

The variable is defined in another JavaScript page that is included in this page, but for some reason Safari doesn't see the definition in the other page. Is Safari executing this script without loading the page that the variable is defined in?

How can I fix this?

Thanks for any help