Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery not working on mobile devices

This is the site: www.alweso.2ap.pl

I can't make it work on mobile phones (resizing the browser works fine).

I finally figured out that a big part of the problem is the fact that jQuery on this website doesn't seem to work on mobile phones. What should I do about it?

I know there's something like jQuery mobile, but is it a must to install it? The typical jQuery library shouldn't be enough?

like image 341
oneday Avatar asked Oct 01 '22 09:10

oneday


1 Answers

jQuery works on phones. jQuery mobile is just for more mobile-centric functionality.

I noticed you have a bunch of errors on your website in the developer console. I'd fix those first:

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

It's possible the mobile browser might not be able to recover from these errors, but a desktop one can.

You can find these errors in the JavaScript Console. For Chrome you can open it in a couple ways:

  • Use the keyboard shortcut Command - Option - J (Mac) or Control -Shift -J (Windows/Linux).
  • Select View > Developer > JavaScript Console.
like image 167
Alexander Mistakidis Avatar answered Oct 05 '22 11:10

Alexander Mistakidis