Building my first theme from scratch in Wordpress 3.4.1, I know Wordpress already has the latest version of the JQuery via Google. I have read about issue's if the script is not called properly, so want to try and keep everything as close to the recommended coding as possibly. I want to make sure the script is loaded which I believe is carried out by the below PHP script in the functions.php file (taken from the Wordpress Codex).
<?php
function my_scripts_method() {
wp_enqueue_script( 'jquery' );
}
I want to basically have a custom menu using JQuery, so is it just a case of placing the script I want to activate in the header or PHP section?
Also if I wanted to enqueue another script that is not included in the Wordpress already, do I simply add the below PHP to the above code in the functions.php file?
wp_register_script( 'jqueryexample', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jqueryexample.min.js');
I am ok with HTML and CSS but PHP and JAVA is relatively new to me, any help is greatly appreciated.
Thanks,
Ant