jQuery Mobile 有一些初期问题。想知道是否有其他人在使用 Firefox(桌面)并在他们的 jQuery Mobile 脚本中包含<head>
这样的错误时遇到了一些错误:
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
在 Chrome 和 Firefox 中,我都会遇到许多 CSS 错误,我认为这些错误可以忽略不计。但是在 Firefox 中,我得到了几个 JS 错误,这似乎也破坏了我的页面(响应元素没有像我删除 jQuery Mobile 脚本时那样呈现)。
JS错误:
Empty string passed to getElementById(). @ http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js:11100
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. @ http://code.jquery.com/jquery-1.9.1.js:3346
我知道这些错误看起来很冗长,但我不熟悉臃肿的 javascript 插件及其优雅降级的政策。还有谁有相同的问题吗?
更新
根据蒂姆的回答,我已经快照了这些 jQuery Mobile '警告'实际上影响页面的证据。下面是我注释掉 jQuery Mobile 脚本标签时的页面:
这是留下 jQuery Mobile 脚本标签时页面的样子:
请注意,我想使用 jQuery Mobile 的原因纯粹是因为它的移动触摸/滑动事件。我没有兴趣采用它的哈希/ajax 链接功能。