After contributing jQuery Numeric Stepper to the jQuery UI community. Paul Bakaus kindly asked whether I’d like to merge it with the official jQuery UI Spinner, of which I was more than happy to do out of pure love for jQuery.
The jQuery UI Spinner widget will be available with the soon to be released jQuery UI v1.6.
Here’s a demo of the current incarnation.
Also, check out Subversion if you’re interested in getting the latest and greatest.
Update: this spin control is currently in re-design phase and will come under intense refactoring to be leaner and meaner. So the UI team have decided to push back its release to v1.next, which means it will not be part of the final 1.6 release. Sorry guys!
Update2: I’ve posted an update on this here.
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
Download latest source code here
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.