aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual/slider/range_slider.html
blob: 64152a9ff3d40f30e73edea741801cb95b3e1918 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Er
<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
	<title>jQuery UI Slider - Range slider</title>
	<link rel="stylesheet" href="../../../themes/base/all.css">
	<style>
		#wrapper {
			font-family: Arial;
			width: 500px;
			margin: 20px auto;
		}
	</style>
	<script src="../../../external/requirejs/require.js"></script>
	<script src="../../../demos/bootstrap.js">
		var el = $( "#slider" ).slider({
			range: true,
			min: 0,
			max: 100,
			values: [ 0, 50 ]
		});

		$( "#set-max-values" ).on( "click", function() {
			el.slider( "option", { values: [ 100, 100 ] } );
		});

		$( "#set-min-values" ).on( "click", function() {
			el.slider( "option", { values: [ 0, 0 ] } );
		});
	</script>
</head>
<body>
<div id="wrapper">
	<h1>Range Slider</h1>
	<h3>When set both values of range slider to the maximum, slider should not lock</h3>
	<div id="slider"></div>
	<br>
	<button id="set-max-values">set values to max</button>
	<button id="set-min-values">set values to min</button>
</div>
</body>
</html>