| 1 |
<!doctype html> |
| 2 |
<html lang="en"> |
| 3 |
<head> |
| 4 |
<meta charset="utf-8"> |
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 |
<title>jQuery UI Slider - Vertical slider</title> |
| 7 |
<link rel="stylesheet" href="../../themes/base/all.css"> |
| 8 |
<link rel="stylesheet" href="../demos.css"> |
| 9 |
<script src="../../external/requirejs/require.js"></script> |
| 10 |
<script src="../bootstrap.js"> |
| 11 |
$( "#slider-vertical" ).slider({ |
| 12 |
orientation: "vertical", |
| 13 |
range: "min", |
| 14 |
min: 0, |
| 15 |
max: 100, |
| 16 |
value: 60, |
| 17 |
slide: function( event, ui ) { |
| 18 |
$( "#amount" ).val( ui.value ); |
| 19 |
} |
| 20 |
}); |
| 21 |
$( "#amount" ).val( $( "#slider-vertical" ).slider( "value" ) ); |
| 22 |
</script> |
| 23 |
</head> |
| 24 |
<body> |
| 25 |
|
| 26 |
<p> |
| 27 |
<label for="amount">Volume:</label> |
| 28 |
<input type="text" id="amount" readonly style="border:0; color:#f6931f; font-weight:bold;" /> |
| 29 |
</p> |
| 30 |
|
| 31 |
<div id="slider-vertical" style="height:200px;"></div> |
| 32 |
|
| 33 |
<div class="demo-description"> |
| 34 |
<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> |
| 35 |
</div> |
| 36 |
</body> |
| 37 |
</html> |