Question

Is it necessary to include the core of jQuery, or is the mobile framework sufficient alone? From what I`ve tried, I concluded that both files are necessary, but I would like to be sure on this issue.

Was it helpful?

Solution

The docs give you all the information you need to know:

A jQuery Mobile site must start with an HTML5 'doctype' to take full advantage of all of the framework's features. (Older devices with browsers that don't understand HTML5 will safely ignore the 'doctype' and various custom attributes.) In the 'head', references to jQuery, jQuery Mobile and the mobile theme CSS are all required to start things off.

In short, yes, jQuery core is required.

OTHER TIPS

http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.js

Based on the code, it doesn't redefine jQuery but extends it so yes, you need the core.

(function( jQuery, window, undefined ) {

})( jQuery, this );

It passes the jQuery object when defining jQuery.mobile. See the demo which includes core before mobile.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top