Reputation: 1
I posted a general question late last week and it got shut down, so I'll do my best to ask a more specific one.
I'm working on a project with jQuery Mobile and I find that customizing has been extremely difficult. What advantage do the data-* attributes serve? I suppose if you really want to use jQuery Mobile predefined styles for objects it's a good thing, but I find overriding some of the styles to be quite annoying.
I'm just wondering if they're there for anything other than styling. Can I still fire off events and what-not within jQuery mobile without using them? A n00b question I know, I just don't want to step on any landmines later in development because of a poor assumption I've made early on.
Upvotes: 0
Views: 356
Reputation: 276
Here is a tutorial that explains how to do advanced customization of the jQuery Mobile buttons. The articles show how to do some basic customization, how to reset the jQuery Mobile theme, and how to turn the default button into anything you want:
http://appcropolis.com/blog/advanced-customization-jquery-mobile-buttons/
Upvotes: 1
Reputation: 85318
data-*
attribute are HTML5 related not jQM:
How to customize the look and feel:
It has yet to be seen but a jQM download builder is in the works so you can pick and choose what functionality you need and forget the rest.
Download builder: In the works
Now that we’ve decoupled most of the UI widgets, we’ve set the stage for there to be a download builder. This will let you build a custom version of jQuery Mobile to only include the parts you need. For example, you could just use the core files to add Ajax-based navigation with pushState and leverage some of the touch events and other utilities with a very lightweight build (roughly 10k). Or, you could add in specific UI widgets like form elements, listviews, etc. to create an optimized build. We’re aiming to have a download builder tool launch as part of 1.0 final in some form. We’re working on a dependency map now for all the plugins to support this tool.
If you are inclined to you can head over to the repo and download what you need:
I think jQM core is still required but I'm not positive on that
Also in your question title you have button formatting
Upvotes: 0
Reputation: 18572
data-*
attributes are really important: http://jquerymobile.com/demos/1.1.0-rc.1/docs/api/data-attributes.html
They are an easy way to define/change content without using raw javascript.
Upvotes: 0