【问题标题】:jQuery Mobile Slider Step Attribute Not WorkingjQuery Mobile 滑块步骤属性不起作用
【发布时间】:2012-03-30 16:18:27
【问题描述】:

我正在使用 Jquery 移动滑块。我想逐步制作滑块。 所以我试过了。

<div data-role="page">
<div data-role="content">
    <label for="slider" class="ui-hidden-accessible">Input slider:</label>
    <input type="range" name="slider"   id="slider_0" value="25" min="0" max="100" step="25" />
</div>

滑块滑动良好,但没有在台阶上移动。

例如:100/25 =4

所以它应该只指向 25,50,75,100,但它会到处滑动。

我在这个地方看到了一个活生生的例子。它在这里工作正常,但为什么它不适合我。

http://code.jquery.com/mobile/latest/demos/docs/forms/slider/index.html

这是我的 jsfiddle

http://jsfiddle.net/chakrirajni/pfNDB/

谢谢,

【问题讨论】:

标签: jquery-mobile


【解决方案1】:

此错误已在下面提到的最新版本的 JQuery 移动库中修复

1)稳定版 - 1.0.1 http://jquerymobile.com/blog/2012/01/26/jquery-mobile-1-0-1-released/

2)不稳定的构建 - 1.1.0 RC1 http://jquerymobile.com/blog/2012/02/28/announcing-jquery-mobile-1-1-0-rc1/

【讨论】:

    【解决方案2】:

    你明白了。

    我用过这些链接。

      <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js"> </script>
    

    它工作正常。

    但我不想看到滑块旁边的文本框。我怎么能在这个版本中做到这一点 我的代码如下所示。

             <label for="slider" class="ui-hidden-accessible">
                                Input slider:</label>
                            <input type="range" name="slider" id="slidstep" step="25"   value="0" min="1" max="100"/>
    

    感谢您的帮助。

    【讨论】:

      猜你喜欢
      • 2014-04-22
      • 2011-12-11
      • 2018-05-31
      • 1970-01-01
      • 1970-01-01
      • 2015-05-17
      • 1970-01-01
      • 2023-03-24
      • 1970-01-01
      相关资源
      最近更新 更多