Closed codepo8 closed 8 years ago
The reason I didn't do it that way to begin with is that multirange()
still needs to be defined, otherwise the JS will error if people call the function manually to cater for dynamically added sliders. Also, the detection itself is outside the loop, only its cached result is checked in multirange()
.
Makes sense, but needs some docs that this is an option. Especially that you need to call it with the input element as the parameter.
Yes, the check is outside, I considered it a sensible move to avoid the loop over all elements, but you're right, this makes the method not reusable.
It is in the docs :)
From the API section:
JS: Use the multirange(element) function to process sliders added to the page later.
…ble browsers
Seems less wasteful.