comparison war/scripts/jQuery/demos/slider/hotelrooms.html @ 3:cf06b77a8bbd

Committed branch of the e4D repos sti-gwt branch 16384. git-svn-id: http://dev.dariah.eu/svn/repos/eu.dariah.de/ap1/sti-gwt-dariah-geobrowser@36 f2b5be40-def6-11e0-8a09-b3c1cc336c6b
author StefanFunk <StefanFunk@f2b5be40-def6-11e0-8a09-b3c1cc336c6b>
date Tue, 17 Jul 2012 13:34:40 +0000
parents
children
comparison
equal deleted inserted replaced
2:2897af43ccc6 3:cf06b77a8bbd
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>jQuery UI Slider - Range with fixed minimum</title>
6 <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
7 <script src="../../jquery-1.5.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 <style>
14 #demo-frame > div.demo { padding: 10px !important; };
15 </style>
16 <script>
17 $(function() {
18 var select = $( "#minbeds" );
19 var slider = $( "<div id='slider'></div>" ).insertAfter( select ).slider({
20 min: 1,
21 max: 6,
22 range: "min",
23 value: select[ 0 ].selectedIndex + 1,
24 slide: function( event, ui ) {
25 select[ 0 ].selectedIndex = ui.value - 1;
26 }
27 });
28 $( "#minbeds" ).change(function() {
29 slider.slider( "value", this.selectedIndex + 1 );
30 });
31 });
32 </script>
33 </head>
34 <body>
35
36 <div class="demo">
37
38 <form id="reservation">
39 <label for="minbeds">Minimum number of beds</label>
40 <select name="minbeds" id="minbeds">
41 <option>1</option>
42 <option>2</option>
43 <option>3</option>
44 <option>4</option>
45 <option>5</option>
46 <option>6</option>
47 </select>
48 </form>
49
50 </div><!-- End demo -->
51
52
53
54 <div class="demo-description">
55 <p>How to bind a slider to an existing select element. The select stays visible to display the change. When the select is changed, the slider is updated, too.</p>
56 </div><!-- End demo-description -->
57
58 </body>
59 </html>