Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: JQuery Issues

add this to functions.php

function my_init() {
if (!is_admin()) {
wp_deregister_script(‘jquery’);
// load the local copy of jQuery in the footer
// wp_register_script(‘jquery’, ‘/wp-includes/js/jquery/jquery.js’, false, ‘1.3.2’, true);
// or load the Google API copy in the footer
// wp_register_script(‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js’, false, ‘1.4.2’, true);

wp_enqueue_script(‘jquery’);
}
}
add_action(‘init’, ‘my_init’);

comment out which one you want to use, then add ur jquery code to the footer.php above wp_footer();
best way to load jquery is in the footer for faster page loading

Skip to toolbar