This is all you need in your function to load jquery.
<?php
function load_jquery(){
wp_enqueue_script('jquery');
}
add_action('wp_enqueue_scripts', 'load_jquery');
?>
Also, make sure your header.php file has this line <?php wp_head(); ?>
I do see a include of jquery from wp-includes. after my wp_head i included the file to my script i.e <script type=”text/javascript” src=”scripts/script.js”></script> which has code
jQuery(document).ready(function(){
alert('test');
});
still nothing pops up
Does the jQuery library get loaded now?
Ok, now step 2.
Register your script, then enqueue it.
Look at this example. (switch scriptaculous with jquery)
Also, read this, http://codex.ww.wp.xz.cn/Function_Reference/wp_register_script ,so you know what you’re doing.
i am n00b. can you gimme a example.i only know of wp_enqueue_script(‘jquery’) how do i register my script?
thats too much for me to digest. i had dine the enqueue bt still its nt working