Support

Account

Home Forums Front-end Issues How to wait until content is loaded before running JS? Reply To: How to wait until content is loaded before running JS?

  • Are you useing jQuery? Or does the slider script use jQuery?

    Where you need to add the code to wait for the content to load is in the JS that you’r enqueuing. If you’re using jQuery then you’d do something like this.

    
    jQuery(document).ready(function($) {
      // your code here
    });
    

    edit: of course you’re using jQuery, your script depends on jQuery and I should have seen that in what you posted, excuse the dumb question.