In this chapter, we looked at the slider widget and saw how quickly and easily it can be put on the page. It requires minimal underlying markup and just a single line of code to initialize.
We looked at the different options that we can set in order to control how the slider behaves and how it is configured once it's initialized. It can be fine-tuned to suit a range of implementations.
We also saw the rich event model that can easily be hooked into, and reacted to, with up to four separate callback functions. This allows us to execute code at important times during an interaction.
Finally, we looked at the range of methods that can be used to programmatically interact with the slider, including methods for setting the value of the handle(s), or getting and setting configuration options after initialization.
These options and methods turn the widget into a useful and highly functional interface tool that adds an excellent level of interactivity to any page.