开发者

WP - jquery works only on homepage

开发者 https://www.devze.com 2023-02-02 10:16 出处:网络
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 (inde

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>?

0

精彩评论

暂无评论...
验证码 换一张
取 消