I'm looking for a plugin to enhance HTML5 input[type=range]
- ideally would like the result to be similar to the jquery-mobile slider:
http://jquerymobile.com/demos/1.0b3/docs/forms/forms-slider.html
I've not found anything yet, quite surprised - seems like a nice standard way to enhance input[type=range]
. Seems excessive roll my own, esp. when this functionality already exists in jquery-mobile! Has anyone come across something like this?
edit: I loo开发者_运维百科ked at the jQueryUI slider - its not what I want!
You can try webshims lib. The script uses jQuery UI as a base, but modifys jQuery UI to make it comptibel with HTML5 specification. There is a demo, which only "polyfills" browsers without type=range support and a demo which overrides the default in all browsers.
The following content attributes are reflected by the polyfilled UI: value, disabled, readonly, step, min and max.
Aditionally you can also set/get the following properties programmatically using $.prop/[$.attr/]$.val: valueAsNumber, value, step, min, max, disabled, readonly
$('#range').prop('valueAsNumber'); //get valueAsNumber
$('#range').val('value', 10); // set value to 10
$('#range').prop('disabled', true);
http://flowplayer.org/tools/rangeinput/index.html
精彩评论