Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mixing JQuery Mobile & JQuery UI

We're thinking to combine JQuery UI and Mobile. Does somebody has some experience with this ?

Past experience is proving tricky jquery forum, but it's a bit old.

Any sharing of experience and ideas is welcomed.

Some experience using the JQuery Mobile virtual events ?

Thanks

like image 613
ic3 Avatar asked Feb 04 '12 07:02

ic3


People also ask

Does jQuery work on mobile?

jQuery Mobile has broad support for the vast majority of all modern desktop, smartphone, tablet, and e-reader platforms. In addition, feature phones and older browsers are supported because of our progressive enhancement approach.

What is the difference between jQuery and jQuery Mobile?

jQuery is a DOM manipulating/traversing and AJAX JavaScript framework. It abstracts out a lot of the complexity between the different browsers automatically. There are countless jQuery plugins that simplify many task. jQuery Mobile is a UI framework geared to mobile applications that is built on jQuery.


2 Answers

The current version of jQuery UI 1.10.4 and jQuery Mobile 1.4.2 do not play well together. Styles in Mobile are ruined as soon as you include jQuery UI into your page.

However, if you need only particular functionality from jQuery UI, as in my case I only need Draggable/Droppable/Sortable interactions, you can create custom jQuery UI download at https://jqueryui.com/download/ and include interactions only. Then you can simply delete everything except js/jquery-ui-1.10.4.custom.min.js file and all works well together again.

I expect you'll run into issues using jQuery UI widgets even using this approach. But, it makes sense to use jQuery Mobile stuff only.

like image 139
zmechanic Avatar answered Nov 05 '22 22:11

zmechanic


If you are targeting tablets and only tablets then this shouldn't be a problem. Just treat JQM as a Jquery plugin and JQuery UI as another plugin.

Its possible you'll run into some UI errors, but it can be fixed. We've worked on an Enterprise Application for one of our clients using JQM and Jquery UI (for the datagrid and a few goodies) and High-charts. The target platform was iPad.

EDIT: Its not an easy process, but you "can" make it work.

like image 28
Rayraegah Avatar answered Nov 05 '22 21:11

Rayraegah