Hello,
I would like to create my library of Javascript functions and use it in my file myjsfile.js but the functions defined in mylibrary.js are not recognized in myjsfile.js
function mylib_enqueue_scripts() {
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'LIB1', '/JS/mylibrary.js' );
wp_register_script( ‘myjsfile’, '/JS/myjsfile.js',array(LIB1'));
wp_enqueue_script(‘myjsfile’);
}
add_action( 'wp_enqueue_scripts', 'mylib_enqueue_scripts' );
What can I do ?
Thank you