noUiSlider 8 release information
After a slower, more incremental development period for noUiSlider, it is time for a shakeup. With a lot of attention going to 'You might not need jQuery' and other initiatives, I felt removing the jQuery dependancy in noUiSlider would be a nice project to spend some time on.
Add to that the rapid progress on the Internet Explorer front. Up to noUiSlider 7, IE7 remained supported, mainly because there was never any need to explicity break compatibility. With IE currently at version 11 and Microsoft Edge ('Project Spartan') approaching, now is as good a time as any to drop the really old versions.
noUiSlider 8 removes the jQuery dependancy completely.
Rewriting the plugin, all tests and the documentation is quite an undertaking, so I wanted to get at least the following out of it:
- The release cycle has to be easier
- Overall file size has to go down
- API's had to be simplified
The LibLink project, which I've always liked working on, formed a problem in this port. It's API is completely rooted in jQuery's method system. Considering the number of support request for this feature, even though it is rather complex, was low, I'm going to assume it wasn't used a lot. I wanted the spirit to remain in place, so I put a lot of thought into a replacement feature. It had to be 1) simpler, 2) have a smaller footprint and 3) be more obvious to use.
The solution I came up with is the new
update event. It fires on any change in the slider value, and when it is bound. This allows synchronizing with input elements without calling the bound function manually. A feature that is missing is the automatic adding of
change events to the inputs: I've attempted to compensate this by providing some additional examples.
What else is new?
- Rebuilding is gone => destroy and rebuild now.
- Looping and iterating in the initializer have been removed.
createtakes one node, and one node only. This saves a lot of code.
- Slider fires no native events anymore.
- No issues in change events with inputs
slideevent now fires for both handles when using the
- Events now have the handle number as an argument.
- Submodules are no longer in the repository. Want wNumb()? Include it!
- The Pips feature, an optional addition in noUiSlider 7, has been merged into the core.
This allowed removing some overhead, shrinking the overall file size.
- Individual handles can now be disabled.
- Slider no longer responds to middle/right clicks.
Version 7 to 8 migration guide
|noUiSlider 7||noUiSlider 8|
|Get the slider value|
|Set the slider value|
|Add an event listener|
|Bind to an |