无法使用Twipsy将null转换为对象
Cannot convert null to object using Twipsy
我在我的Web应用程序中使用Twitter引导程序,在我的资料页中,我执行以下
<%--Referencing jQuery--%>
<script type="text/javascript" src="Scripts/jquery-1.4.1.js"></script>
<%--Referencing the bootstraper script--%>
<script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-twipsy.js" type="text/javascript"></script>
<%--My Script--%>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$("a").twipsy();
});
</script>
然后在页面(Default.aspx)中,代码ia有一个这样的链接:
<a href="#" id="example" class="classeTeste" title="Some title text">text</a>
当运行页面时,twipsy(一种样式化的工具提示)不起作用。看看这里,看看twipsy在行动(http://twitter.github.com/bootstrap/javascript.html#twipsy)
我看到了"正常工具提示"
检查chrome控制台时,我看到以下脚本错误未捕获类型错误:无法将null转换为对象(bootstrap twipsy.js:315)
怎么了?
您的JQuery版本太旧,这可能就是原因。
另一种可能性是,您的选择器是$("a"),而不是id,$("#mylink")。不过,文档建议它应该与集合一起使用。
相关文章:
- 为什么 Javascript 在变量赋值时将 null 转换为字符串
- 无法在jasmine it函数中将未定义或null转换为对象
- 为什么运算符equal没有将从valueOf()获得的null转换为零
- DWR 报告转换器错误,将 null 从 Javascript 传递到 Java 类
- 在 javascript 中将 “null” 转换为 null
- 将Python None转换为JavaScript null
- 无法将未定义或null转换为对象
- 无法使用Twipsy将null转换为对象
- 为什么 null 未在条件语句中转换为布尔值
- 如何解决TypeError:不能在函数中将未定义或null转换为对象.键(& lt; anonymous>)
- 将json数组转换为查询字符串返回null
- Jquery .position将null转换为0
- 当使用hasOwnProperty时,不能将null或undefined转换为对象
- Javascript:避免使用null或未定义变量进行字符串到整数或浮点类型转换的异常
- 将对象中存在的对象转换为NULL值
- 可以在检查undefined/null时使用类型强制转换
- JavaScript将NULL转换为0
- $.ajaxPrefilter引发未捕获类型错误:无法将null转换为对象异常
- VS代码错误”;无法将未定义或null转换为对象“”;所有JavaScript文件
- 未捕获的类型错误:无法将未定义或 null 转换为对象