如何创建jQuery价格滑块 [英] How to create a jQuery price slider

查看:73
本文介绍了如何创建jQuery价格滑块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找教程,但是没有运气.我不是要任何人为我做这项工作,而是要看看是否有人知道有用的东西.

I have been trying to find a tutorial but had had no luck. I'm not asking anyone to do the work for me but more to see if anyone knows anything useful.

所以基本上我需要我的滑块的最小值为零和动态设置的最大值(获取动态值不是问题).

so basically i need my slider to to have a minimum value of zero and a dynamically set maximum value (getting the dynamic value is not an issue).

0 ------------------- o ------------------ 200

0 -------------------o------------------ 200

因此,中间的"o"将是您可点击的滑动元素. 我需要它在右边的框中输出您正在使用的电话号码.因此,在此示例中,它将输出100.非常类似于在视频播放器上设置音量.

So the 'o' in the middle would be your clickable sliding element. I need it to output in a box to the right the number that you are on. So in this example it would output 100. Very much like setting the volume on a video player.

基本上,这是用于奖励积分系统的,因此人们可以在拥有的奖励积分上滑动,并输出相当于多少磅的奖励.

Basically this is for a reward point system, so people can slider across how many reward points they have and it will output how many pounds this is the equivalent of.

正如我所说的那样,我在寻求帮助的同时也希望找到教程,但是如果有人可以发布将我推向正确方向的代码段,我将不胜感激.

As i said im more looking for help finding a tutorial but would always be grateful if someone could post a snippet that would push me in the right direction.

推荐答案

Try this:

http://jquerymobile.com/demos/1.0a2/#docs/forms/forms-slider.html

<body class=""> 
<link rel="stylesheet" href="jquery.css">

<script src="jquery-1.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<div class="" id="" data-role="page">

<div class="ui-field-contain ui-body ui-br" data-role="fieldcontain">
<input class="" name="slider" id="slider" value="100" min="0" max="10" data-type="range">
</div>

这篇关于如何创建jQuery价格滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆