jQuery没有在移动设备上工作

one*_*day 5 mobile jquery jquery-mobile

这是网站:www.alweso.2ap.pl

我不能让它在手机上工作(调整浏览器的大小可以正常工作).

我终于弄清楚问题的一个重要部分是这个网站上的jQuery似乎不适用于手机.我该怎么办呢?

我知道有类似jQuery mobile的东西,但它是否必须安装它?典型的jQuery库应该不够用?

Ale*_*dis 4

jQuery 适用于手机。jQuery mobile 只是为了提供更多以移动为中心的功能。

我注意到您的开发者控制台网站上有很多错误。我会先解决这些问题:

Failed to load resource: the server responded with a status of 404 (Not Found) http://www.alweso.2ap.pl/js/jquery.mobile/jquery.mobile-1.4.2.min
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.alweso.2ap.pl/nivo-slider.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.alweso.2ap.pl/lib/jquery.bxslider.css
Uncaught SyntaxError: Unexpected identifier arrow-bounce.js:2
Uncaught SyntaxError: Unexpected end of input onemore.js:12
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.alweso.2ap.pl/font-awesome-4.0.3/css/font-awesome-4.0.3/fonts/fontawesome-webfont.woff?v=4.0.3
Run Code Online (Sandbox Code Playgroud)

移动浏览器可能无法从这些错误中恢复,但桌面浏览器可以。

您可以在 JavaScript 控制台中找到这些错误。对于 Chrome,您可以通过以下几种方式打开它:

  • 使用键盘快捷键 Command - Option - J (Mac) 或 Control -Shift -J (Windows/Linux)。
  • 选择“视图”>“开发人员”>“JavaScript 控制台”。

  • 我设法摆脱了几乎所有你提到的错误,另外我删除了一些我不再使用的代码,并且 javascript 似乎正在工作!再次感谢,移动设备上仍然存在很多问题,但至少少了一个感谢您的帮助:) (3认同)