How do I enqueue jQuery in my theme?
-
Hope someone can shed some light on this for me. I am using jQuery in a few of my themes and I was advised by the excellent ebook Digging into WordPress to use the built-in wordpress jQuery library by adding this code …
<?php wp_enqueue_script(‘jquery’); ?>
So I plonked that in my themes in the <head> but it has no effect. At the mo I have uploaded a copy of jQuery to my themes and am linking to that, which works just fine. But obviously better to use the wordpress version already loaded. Can anyone tell me what I need to do?
TA.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How do I enqueue jQuery in my theme?’ is closed to new replies.