Closed salvan13 closed 8 years ago
Thanks! However, I recently refactored the init code to account for usage in <head>
(https://github.com/LeaVerou/multirange/commit/be92febef6d31d4551f060550077e4782d2e3154) and as part of that I added a :not(.multirange)
to the selector which also prevents multiple intialization. Sorry!
Thank you for contributing though!
It's OK, I like your solution :thumbsup:
But... what if someone calls multirange(input) twice?
Ouch, good point. Yeah, it needs to check in multirange()
as well. Can you simplify this PR to just check for classList.contains("multirange")
? I'd rather keep this small.
Thanks, but it's easier to just check if it has the class
multirange
, instead of adding an extra attribute. Wanna try that? :)