Hi Carlos -
That looks like a nice plugin. So are you looking for feedback of how to design the API and data attributes for your plugin or just general advice on developing widgets.
- Use the widget factory - all the internal widgets use this and it provides a clear template for organizing your code and automatically does things like exposing all options as data attributes
- Use the theme framework - follow how our plugins work where they have structural styles that don't ever set bg colors, font colors, etc. so the theme will flow through. In your widget, have it inherit teh swatch from the parent if not set as a data attribute
- Use semantics to drive your widget - if possible, use HTML5 markup for better semantics and native ways of setting configuration data. For example, is is really a progress bar so I might use the new progress element here:
http://www.w3.org/TR/html-markup/progress.html. You can set the max and current values using native attributes and add data- attributes for the others.
..............................................
Todd Parker
jQuery Mobile & UI design lead
Partner, Filament Group Inc.
todd@filamentgroup.com..............................................
Todd Parker
jQuery Mobile & UI design lead
Partner, Filament Group Inc.
todd@filamentgroup.com