I have an initialization script for a slider which must load after the slider's script is loaded, however, the slider script is being loaded by a plugin and persists at the end of the script calls regardless of me prioritizing my initialization script 999999 in the enqueue action. How do I get it to load after the plugin script?
In my child theme's functions.php
:
function init_royalslider() {
wp_enqueue_script(
'sliderInit',
get_stylesheet_directory_uri() . '/template-parts/royalslider-custom/js/sliderInit.js',
array( 'jquery' ), '', true
);
}
add_action( 'wp_enqueue_scripts', 'init_royalslider', 9999999 );
Thanks for any insight!