1 |
<!doctype html> |
2 |
<html lang="en"> |
3 |
<head> |
4 |
<meta charset="utf-8"> |
5 |
<title>jQuery UI Slider - Vertical slider</title> |
6 |
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"> |
7 |
<script src="../../jquery-1.9.1.js"></script> |
8 |
<script src="../../ui/jquery.ui.core.js"></script> |
9 |
<script src="../../ui/jquery.ui.widget.js"></script> |
10 |
<script src="../../ui/jquery.ui.mouse.js"></script> |
11 |
<script src="../../ui/jquery.ui.slider.js"></script> |
12 |
<link rel="stylesheet" href="../demos.css"> |
13 |
<script> |
14 |
$(function() { |
15 |
$( "#slider-vertical" ).slider({ |
16 |
orientation: "vertical", |
17 |
range: "min", |
18 |
min: 0, |
19 |
max: 100, |
20 |
value: 60, |
21 |
slide: function( event, ui ) { |
22 |
$( "#amount" ).val( ui.value ); |
23 |
} |
24 |
}); |
25 |
$( "#amount" ).val( $( "#slider-vertical" ).slider( "value" ) ); |
26 |
}); |
27 |
</script> |
28 |
</head> |
29 |
<body> |
30 |
|
31 |
<p> |
32 |
<label for="amount">Volume:</label> |
33 |
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" /> |
34 |
</p> |
35 |
|
36 |
<div id="slider-vertical" style="height:200px;"></div> |
37 |
|
38 |
<div class="demo-description"> |
39 |
<p>Change the orientation of the slider to vertical. Assign a height value via <code>.height()</code> or by setting the height through CSS, and set the <code>orientation</code> option to "vertical."</p> |
40 |
</div> |
41 |
</body> |
42 |
</html> |