I've been trying to use the recommended method of adding javascript files to WordPress, after reading this http://codex.wordpress.org/Function_Reference/wp_enqueue_script but I'm having a hard time figuring it out...
I've added this to my functions.php:
function enqueue_raluk_scripts() {
wp_enqueue_script( 'tinynav-script', get_template_directory_uri() . '/scripts/tinynav.js', array('jquery') );
wp_enqueue_script( 'superfish-script', get_template_directory_uri() . '/scripts/superfish.js', array('jquery') );
}
add_action( 'wp_enqueue_scripts', 'enqueue_raluk_scripts' );
and after looking inside the source code of my site I can see that they're appearing inside the tags.
The problem is that those two javascript files require jQuery 1.8.3 to work, and the WordPress built-in jQuery version is newer. How can I go about solving this issue without deregistering (which is a bad practice) the WordPress's default jQuery version? Is there any way to assign a specific jQuery version to be used by certain javascript files? Thanks.