WP - jquery works only on homepage
i'm calling an external js file with a bit of jQuery, a $(document).ready
function which triggers on mouseover
. The call is made in the footer.php, which is included in all of the theme's page (index.php, 开发者_运维百科page.php etc).
The jQuery works fine on the homepage but doesn't seem to work on any other page. Any ideas?
Thanks.
How do you include jQuery? Using enqueue_script()
? If yes, WP include jQuery with noConflict activated. So you should use jQuery
instead of $
.
It is hard to guess things... have you tried moving the code from the footer into the <head>
?
精彩评论