0

After many fruitless days of trying to get JQuery Mobile and AngularJS routing to work together, I'm considering my alternative options..

Is there a way to use the JQM CSS without relying on JQuery's javascript?

Or is there a substitute CSS package that are recommended? something with all header/footers and lists that is available in JQM?

2
  • Hi, what can we try ? First remove the javascript library and take a look. What happens ? Commented Feb 2, 2013 at 17:48
  • Have you consider another way to fix your 'routing to work together' situation ? What about AngularJS ? Commented Feb 2, 2013 at 17:55

4 Answers 4

3

Of course, there is an CSS file in the package you downloaded. But all the sites functionality and the mobile adaption will be broken. You can rename the classes and the id's or directly use the classes from the css file. Greets

Sign up to request clarification or add additional context in comments.

2 Comments

Painful approach but also a reliable one.
Thanks! that's my approach for now. Some of the form controls don't work (like the toggle switch). but the basics (header, footer, buttons are working)
2

There are quite a few jQueryMobile functionalities that rely solely on the CSS fole, eg. the grids. You won't get the interactions, but all the buttons looks, shapes and colors are totally useful without the JS.

Still - depends on your expectations.

And when using it like that you need to understand a bit how JQM works to know the classes and html structure that's expected, because some of these are generated by javascript.

[kind of digression]

But maybe you just dislike how big jquerymobile is?

Then you probably want to use: http://jquerymobile.com/download-builder/ to get only stuff you need, and also use tte themeroller here: http://jquerymobile.com/themeroller/index.php to create only one theme (global) and remove other themes (A,B,C)

That's how you get it a lot smaller.

Comments

0

You can reuse the CSS file inside he downloaded JQM package. The file jquery.mobile-1.x.x.css can be included, but make sure to include the images folder as well and have it at the same location at the destination.

If you aren't sure of which classes to include for which purpose, you can simply find it out by inspecting a JQM demo page to find out (View source will not work due to the JQM javascript).

Comments

0

JQS provides support for ui animations and user experience enhancement. Removing libraries will dispart you from accessing css contents created and used by javascript in order to 'manage' a front-end design. –

Yes you can use jquery mobile theme and adapt it to your needs. Just reading there was adapter releases for your situation : https://groups.google.com/forum/?fromgroups#!topic/angular/oIxRxpkn3L0

Perhaps substitutes to css packages are documented. About heavier JQM templating and using, there are some introduction to what you'll need to take a look at like adobe theme-control-jquery-mobile.html ..

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.