As an experiement I ported over my Accessible Numeric Stepper into a jQuery widget and added some accessibility enhancements and new features in the process.
This widget utilises ui.core.js – a factory method object for creating widget classes. Widgets in jQuery are essentially plugins at heart but built to follow stricter coding standards in order to unify the underlying quality between developers. It also adds convenient mouse interaction classes and option settings among other things.
The result is jQuery Numeric Stepper an unofficial jQuery UI widget. Features include:
- min, max, start and step size settings
- supports decimal values and decimal step sizes
- supports currency values
- keyboard and mousewheel interaction – increment/decrement values via cursor keys, +/- keys and mousewheel
Bugs? Missing feature? Code improvements? Let me know!
Update: Features seen here are now part of the official jQuery UI Spinner, set for the 1.6 release of jQuery UI. More details.