add jquery to wordpress

JavaScript
add_action( 'wp_enqueue_scripts', 'add_my_script' );
function add_my_script() {
    wp_enqueue_script(
        'your-script', // name your script so that you can attach other scripts and de-register, etc.
        get_template_directory_uri() . '/js/your-script.js', // this is the location of your script file
        array('jquery') // this array lists the scripts upon which your script depends
    );
}
// works great but you need to have your jquery script in "/js/your-script.js" with "jQuery" replacing the "$". eg:jQuery(document) instead of $(document)
Source

Also in JavaScript: