4 ms·
Nice, but a bit annoying to mix styles and other settings in the data attribute like that, and they would have to be repeated for each knob. A library to easil
by jacobr 14y ago
Nice, but a bit annoying to mix styles and other settings in the data attribute like that, and they would have to be repeated for each knob.
A library to easily parse custom CSS properties would be pretty cool. The "CSS" could be either in regular stylesheets (browsers ignore properties they don't understand), in a data-style attribute or maybe in a <style> element with a custom type attribute value. Browsers ignore properties and selectors they don't understand anyway.
<style>
.knob::-jquery-knob { ... }
</style>
or
<style type="text/jquery-knob">
.knob { ... }
</style>
or
<input style="width: 150px; -jquery-knob-skin: tron">