我是靠谱客的博主 能干荷花,这篇文章主要介绍wordpress引入jquery 报错 jQuery is not defined,现在分享给大家,希望可以做个参考。

wordpress引入jquery
引入wordpress内的jquery

<?php wp_enqueue_script("jquery"); ?>

位置写到了

<?php wp_head(); ?>之前,但是报错

在这里插入图片描述
改了一大会,不是引入错了,而是顺序,把自定义的script代码也放到wp_head下边就好啦!
代码如下(header.php里)

<?php wp_enqueue_script("jquery"); ?>
<?php wp_head(); ?>//原来有的
<?php astra_head_bottom(); ?>//原来有的
<script type="text/javascript" > 
	jQuery(document).ready(function($){ 
		
	})
</script> 

最后

以上就是能干荷花最近收集整理的关于wordpress引入jquery 报错 jQuery is not defined的全部内容,更多相关wordpress引入jquery内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(109)

评论列表共有 0 条评论

立即
投稿
返回
顶部