I want to add a simple highlight to my active menus in wordpress. To do this I have this i have tracked down some pieces of code that might be useful (if they worked.) I am a complete rookie when it comes to js, but i know so much as to put this snippet of code inside my functions.php
// Enqueue JavaScripts
function theme_scripts() {
wp_enqueue_script('cartrawler', get_template_directory_uri() . 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js', array(), '20120802', '1');
wp_enqueue_script('cartrawler', get_template_directory_uri() . '/js/jquery.colorbox-min.js', array(), '20120802', '1');
wp_enqueue_script('cartrawler', get_template_directory_uri() . '/js/activemenu.js', array(), '30120802', '1');
}
add_action('wp_enqueue_scripts', 'theme_scripts');
I have refered to this link in helping me out on the small script that makes this possible: http://jsfiddle.net/K6F8m/