jQuery Dragval

drag and choose value

jQuery Dragval is jQuery plugin to create a dragging measure.

<div id="Slider" class="Dragval">

<input type="text" name="" value="" class="Output" />

</div>

 

<script type="text/javascript">

$(function() {

$("#Slider").dragval();

});

</script>

<div id="Slider2" class="Dragval">

<input type="text" name="" value="" class="Output" />

</div>

 

<script type="text/javascript">

$(function() {

$("#Slider2").dragval({ step: 50, min: 0, max: 50000, startValue: 45000 });

});

</script>

Main parameters (default):

loopTime: 60, // (ms)

clickTime: 200, // (ms)

step: 10000,

min: 10000,

max: 2000000,

startValue: 0,

How to use?

In head:

<link type="text/css" rel="stylesheet" href="css/jquery.dragval-1.0.css" />

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript">

<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" type="text/javascript">

<script src="js/jquery.dragval-1.0-pack.js" type="text/javascript">

 

In body:

<div id="Slider2" class="Dragval">

<input type="text" name="" value="" class="Output" />

</div>

 

<script type="text/javascript">

$(function() {

$("#Slider2").dragval({ step: 50, min: 0, max: 50000, startValue: 45000 });

});

</script>

适用浏览器:IE8、360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗.

来源:站长素材