Speed up slider – load JavaScript in the head?
-
Hi, I have set up a website and added a slider to the homepage using Soliloquy Lite. There is a slight delay in the slider loading so I would like to move the main plugin js file into the head section to try to speed this up.
Where the js file is loaded in shortcode.php I have changed the $in_footer parameter from true to false in the following function:
// Register main slider script.
wp_register_script( $this->base->plugin_slug . ‘-script’, plugins_url( ‘assets/js/min/soliloquy-min.js’, $this->base->file ), array( ‘jquery’ ), $this->base->version, false );However, after changing this the /wp-content/plugins/soliloquy-lite/assets/js/min/soliloquy-min.js javascript file is still being loaded in the same place near the bottom of the tag.
Why is the $in_footer parameter not taking effect?
Or is there another way to speed up the loading of the slider?
Thank you.
Sarah
- The topic ‘Speed up slider – load JavaScript in the head?’ is closed to new replies.