Add a scale to a jquery mobile slider form

时间:2015-06-30 13:37:27

标签: javascript jquery cordova jquery-mobile

I'm trying to add a jquery slider to my phonegap app. Unfortunately I haven't found out how to add a scale on both sides of the slider. Something like: "foo" ----x------ "bar" Till now i only have the slider.

<form>
    <label for="lighting">Rate us</label>
    <input type="range" name="rate" id="rate" min="1" max="7" />
    <input type="submit" name="go" id="go" value="Rate my app!"/>
</form>

1 个答案:

答案 0 :(得分:1)

您可以添加带刻度标记的刻度,如下所示:

float a = 123.456789
int b = 123
float c = 0.456789
  

<强> DEMO

对于滑块的其他想法,请看一下:

https://jqmtricks.wordpress.com/2014/04/21/fun-with-the-slider-widget/