类型错误:$ 不是 WordPress 函数 [英] TypeError: $ is not a function WordPress
本文介绍了类型错误:$ 不是 WordPress 函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我购买的主题中的 .js
文档可能有错误:
I might have an error in a .js
document in a theme I have purchase:
$('.tagcloud a').wrap('<span class="st_tag" />');
我正在尝试解决它,但我不是程序员,所以我不知道如何解决.该网站是这样的:http://www.framerental.com.
I am trying to solve it but I am not a programmer so I don't know how. The site is this: http://www.framerental.com .
推荐答案
你使用了 jQuery.noConflict();
所以 $
是未定义的.
You use jQuery.noConflict();
So $
is undefined.
您可以在此处阅读更多相关信息docs
You can read more about it here docs
尝试以这种方式修改您的代码(将 $
符号添加到就绪函数中):
Try to modify your code in this way (add $
sign to ready function):
jQuery(document).ready(function($) {
// Code that uses jQuery's $ can follow here.
});
这篇关于类型错误:$ 不是 WordPress 函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文