为什么jquery加载来自functions.php的第二次刷新

I am converting an html template to WordPress. I use wp_enqueue_script() from functions.php page. But the .js files loads after second refresh of the page. I have progress bar and top (link to top of the page) on home page which are not working. Please help

I tried wp_deregister_script('jquery'); but it also not working

function loadjs(){
    wp_deregister_script('jquery');

    wp_register_script('juery', get_template_directory_uri() . '/assets/js/jquery-3.2.1.min.js');
    wp_enqueue_script('juery');
wp_register_script('custom', get_template_directory_uri() . '/assets/js/custom.js');
    wp_enqueue_script('custom');
}

add_action('wp_enqueue_scripts', 'loadjs');

progress bar work after second refresh and top function not working

Thanks for replying everyone, I just figure out the solution. This was due to jquery and solved with a plugin called 'jquery updater'.