Skip to content

Commit

Permalink
Fixing jQuery script registration
Browse files Browse the repository at this point in the history
  • Loading branch information
CK Hicks committed Jun 20, 2016
1 parent 5996e27 commit f85159d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions/wordpress/enqueue-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ function enqueue_custom_scripts() {

// Remove default jQuery and add Google hosted version to the footer
// Are you building a site that requires IE8? Use: //ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
wp_deregister_script('jquery');
wp_register_script('jquery', ('//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js'), false, '2.1.3', true);
wp_enqueue_script('jquery');
wp_deregister_script('jquery-core');
wp_register_script('jquery-core', ('//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js'), false, '2.1.3', true);
wp_enqueue_script('jquery-core');

// Load the site's main.js file but make sure jQuery is there first
wp_register_script('site-main', (get_stylesheet_directory_uri() . '/assets/js/main.js'), array('jquery'), '1.0.0', true);
Expand Down

0 comments on commit f85159d

Please sign in to comment.