Hi Mohammad,
I found out how to load the child’s script(s) after the parents script(s),
but I didn’t help to solve my problem. I changed following code:
/* ENQUEUE CHILD-SCRIPTS
================================================== */
function sc_scripts() {
wp_enqueue_script( 'modernizr', 'https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js', array(), '1.0.0', true );
wp_enqueue_script( 'prefixfree', 'https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js', array(), '1.0.0', true );
wp_enqueue_script( 'swisscomply', get_stylesheet_directory_uri() . '/js/swisscomply.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'sc_scripts' );
… in functions.php as follows:
/* ENQUEUE CHILD-SCRIPTS
================================================== */
function sc_scripts() {
wp_enqueue_script( 'modernizr', 'https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js', array(), '1.0.0', true );
wp_enqueue_script( 'prefixfree', 'https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js', array(), '1.0.0', true );
wp_enqueue_script( 'swisscomply', get_stylesheet_directory_uri() . '/js/swisscomply.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'sc_scripts', 20);
What i’ve done was increasing the priority (third arg) in add_action
But that didn’t solve my problem and i’ll start another thread.
best,
heinetz