我刚刚将 jQuery 工具加载到我的网站上。但谷歌浏览器控制台显示错误:
Uncaught Error: Syntax error, unrecognized expression: [href=/] (http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js)
我使用的 jQuery 版本是 1.7.1
如何处理这个问题?
我刚刚将 jQuery 工具加载到我的网站上。但谷歌浏览器控制台显示错误:
Uncaught Error: Syntax error, unrecognized expression: [href=/] (http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js)
我使用的 jQuery 版本是 1.7.1
如何处理这个问题?
我的猜测是您更改了库的顺序。如果要使用 JQuery,则必须先加载其库才能使用附加的 JQuery-Expansion-Lib。您应该像这样更改顺序<head>
:
<html>
<head>
<link rel="stylesheet" type="text/css" href="formate.css"> //CSS always first
<script src="URL_TO_JQUERY" type="text/javascript"></script> //JQuery first
<script src="URL_TO_ADDITIONAL_LIB_1" type="text/javascript"></script>
<script src="URL_TO_ADDITIONAL_LIB_..." type="text/javascript"></script>
<script src="URL_TO_ADDITIONAL_LIB_n" type="text/javascript"></script>
</head>
</html>