Add this to the bottom of your functions file, it is the only call to jquery you will need, you can change the version if needed.
1 2 3 4 5 6 7 8 9 |
// jquery call if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11); function my_jquery_enqueue() { wp_deregister_script('jquery'); wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null); wp_enqueue_script('jquery'); } |
To test it just add this anywhere you choose….
1 2 3 4 5 6 7 |
<script> $(document).ready(function(){ alert("Hooray jquery was loaded"); }); </script> |
From then on just use document ready script to start a jquery function….