Can I assume that JavaScript-enabled mobile browsers also support jQuery?

I understand that this question may be almost impossible to answer definitively, but:

Is it possible to assume that a mobile browser with JavaScript can also handle jQuery? We are talking about relatively basic jQuery such as click and Ajax events.

I am writing a mobile application for HTML. It includes weak maps, so anyone who wants to use it must have JavaScript.

I would prefer to use jQuery for the rest of the coding, if possible, but can I reasonably tell the client: β€œAny phone with JavaScript should support basic jQuery”?

I know about jQuery mobile, but I'm specifically talking about phones that are not advanced enough to handle jQuery mobile, but that have JavaScript.

Thanks!

+4
source share
8 answers

Yes.

jQuery is not a language. This is a JavaScript library, and therefore, if you can run JavaScript well enough, you can run jQuery without any problems.

With that said, nothing compares to actual testing. Periodically check if your code works on several platforms (not only on different phones, but also on different browsers).

+5
source

javascript is javascript. You can always use jQuery.support to discover functions . You should test the browsers you want to support anyway.

+1
source

The answer is simple: yes.

JQuery, and especially its most basic features, is designed for cross-browser. If the mobile browser has reasonable javascript support, jQuery should not be a problem.

To return to functions you are not sure whether you are supported or not, you can use jquery.Support or Modernizr

+1
source

It should work fine on most ... don't expect much from an explorer's pocket.

Although jQuery functions in these browsers, IRL many of the effects that jQuery makes simple cannot be seen in the mobile browser, because the interface is so different. There (almost) no concept of mousedown, mouseup or hover; click and focus behave differently, screen different vs effective window size, animations are slow, etc. The problem in mobile browsers is mainly in the design of the interface. The main advantage of IMO is the downloaded AJAX content, for speed and low data / bandwidth usage.

+1
source

In short: yes.

HOWEVER, if you only do Ajax and other little things, you will see a significant increase in speed using Vanilla JS. But I understand that it can be somehow a pain. There are lighter packages, for example xui .

Honestly, I would think about programming individual sites for mobile Safari (iOS and Android) and other lower-power devices that don't run WebKit.

Repeat iteration: jQuery.mobile is not a replacement for jQuery, but rather a framework built on jQuery, just like jQuery-ui. This will be even larger in size and load time.

+1
source

You can check out http://jquerymobile.com/ - perhaps this is what you should use on your pages instead of the "regular" jquery.

0
source

Yes, but you'd better use jQuery Mobile if you are developing for mobile. It is optimized for them.

0
source

Check out jQuery mobile , as well as a very informative slideshow that describes the scope and complexity of the problem you are facing.

0
source

All Articles