I am enqueuing javascript files with functions.php, one of the is a external link and another is not.
They are both loading all right, but it's loading the internal file before the external, so there're some bits of the code that are not working.
This is the code:
function _tandt_scripts() {
$my_js_ver = date("ymd-Gis");
wp_deregister_script( 'jquery' );
wp_register_script('jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js', array(), '2.1.3', true);
wp_enqueue_script( '_tandt-main', get_template_directory_uri() . '/_assets/js/main/min/main-min.js', array(), $my_js_ver, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', '_tandt_scripts' );
As you can see in the screenshot, it's loading the 'main-min.js' first, when it should be the other way around.
screenshot
