未捕获的TypeError:对象[object global]的属性'$'不是函数吗? [英] Uncaught TypeError: Property '$' of object [object global] is not a function?

查看:86
本文介绍了未捕获的TypeError:对象[object global]的属性'$'不是函数吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到以下错误

未捕获的TypeError:对象[object global]的属性'$'不是函数 在第2行:

Uncaught TypeError: Property '$' of object [object global] is not a function in line 2:

使用以下代码:

$(document).ready(function() {
    $('#tabs > ul').tabs({ fx: { opacity: 'toggle' } });
    $('#featuredvid > ul').tabs();
});

该问题仅在127.0.0.1本地出现,而相同代码可以在线!我眼花,乱,有什么主意吗?

The problem appears local at 127.0.0.1 only, while same code OK online! I'm dazzled, any ideas?

推荐答案

当我尝试使用 slide effect 是jQuery的一部分,但实际上是jQuery UI效果.这是我的控制台的输出:

I ran into this error when I was trying to use the slide effect that I thought was part of jQuery but was actually a jQuery UI effect. This was the output from my console:

Uncaught TypeError: Property '#<Object>' of object #<Object> is not a function

因此,在我看来,您似乎只需要包括jquery UI库.在包含jQuery之后添加此行.

So, to me it seems like you just need to include the jquery UI library. Add this line after you include jQuery.

<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

这篇关于未捕获的TypeError:对象[object global]的属性'$'不是函数吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆