【发布时间】:2014-07-08 10:06:14
【问题描述】:
所以我正在尝试将我的移动网站的 jQuery 从 1.7.3 升级到 1.8 以上,但是当我这样做时,我得到了这个控制台错误:
[Error] Error: Syntax error, unrecognized expression: [data-role]=page error (jquery-1.8.0.js, line 4512)
tokenize (jquery-1.8.0.js, line 4785)
compile (jquery-1.8.0.js, line 4883)
select (jquery-1.8.0.js, line 4973)
select (jquery-1.8.0.js, line 5083)
Sizzle (jquery-1.8.0.js, line 3912)
find (jquery.mobile-1.3.2.js, line 348)
matchesSelector (jquery.mobile-1.3.2.js, line 358)
filter (jquery-1.8.0.js, line 5371)
is (jquery-1.8.0.js, line 5218)
dispatch (jquery-1.8.0.js, line 3027)
eventHandle (jquery-1.8.0.js, line 2677)
trigger (jquery-1.8.0.js, line 2941)
(anonymous function) (jquery-1.8.0.js, line 3607)
each (jquery-1.8.0.js, line 611)
each (jquery-1.8.0.js, line 241)
trigger (jquery-1.8.0.js, line 3606)
_trigger (jquery.mobile-1.3.2.js, line 835)
(anonymous function) (jquery.mobile-1.3.2.js, line 4065)
fire (jquery-1.8.0.js, line 973)
add (jquery-1.8.0.js, line 1016)
transitionPages (jquery.mobile-1.3.2.js, line 4058)
changePage (jquery.mobile-1.3.2.js, line 4708)
initializePage (jquery.mobile-1.3.2.js, line 11158)
(anonymous function) (jquery.mobile-1.3.2.js, line 11192)
fire (jquery-1.8.0.js, line 973)
fireWith (jquery-1.8.0.js, line 1080)
ready (jquery-1.8.0.js, line 406)
DOMContentLoaded (jquery-1.8.0.js, line 83)
这个错误的结果是我什么都做不了。我无法切换页面,iScroll 也不行。
我不知道错误可能出现在我的代码中,因为我没有看到对 jQuery 库以外的任何其他内容的错误引用,所以我真的不知道在此处放置什么代码。这不是我自己编写的代码。干杯:)
【问题讨论】:
标签: jquery-mobile jquery-1.7 jquery-1.8