aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual/slider/slider_ticket_4385.html
blob: 7a7456abb66579321ddab258126ba817730afacb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!doctype html>
<html lang="en">
<head>
	<title>Slider Visual Test : Slider ticket #4385</title>
	<link rel="stylesheet" href="../visual.css" type="text/css" />
	<link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
	<script type="text/javascript" src="../../../jquery-1.3.2.js"></script>
	<script type="text/javascript" src="../../../ui/ui.core.js"></script>
	<script type="text/javascript" src="../../../ui/ui.slider.js"></script>
	<script type="text/javascript">
	$(function() {
		$("#slider").slider({
			range: true,
			min: 0,
			max: 500,
			values: [75, 300],
			slide: function(event, ui) {
				var minMet = ((ui.values[1] - ui.values[0]) > 50);
				minMet && $("#rangevalue").text(ui.values[0] + ' - ' + ui.values[1]);
				return minMet;
			}
		});
		$("#rangevalue").text($("#slider").slider("values", 0) + ' - ' + $("#slider").slider("values", 1));
	});
	</script>
</head>
<body>

<h1 class="ui-widget-header"><a href="http://dev.jqueryui.com/ticket/4385">#4385 - event slide callback returning false can lead to stuck range handles</a></h1>

<p>
<label for="rangevalue">Price range:</label>
<span id="rangevalue"></span>
</p>

<div id="slider"></div>

</body>
</html>