summaryrefslogtreecommitdiffstats
path: root/demos/slider/slider_vertical.html
diff options
context:
space:
mode:
authorTodd Parker <fg.todd@gmail.com>2008-12-30 21:33:00 +0000
committerTodd Parker <fg.todd@gmail.com>2008-12-30 21:33:00 +0000
commitee99ec9b8a897cbafcb072f9cf4b50c43739fbad (patch)
tree4ec3091a80bc8b9444ff7ceb223439aec169b36e /demos/slider/slider_vertical.html
parent25210e9cfdfd9591299a814d93a8cff9cf776856 (diff)
downloadjquery-ui-ee99ec9b8a897cbafcb072f9cf4b50c43739fbad.tar.gz
jquery-ui-ee99ec9b8a897cbafcb072f9cf4b50c43739fbad.zip
Added feedback of the current slider value next to label.
Diffstat (limited to 'demos/slider/slider_vertical.html')
-rw-r--r--demos/slider/slider_vertical.html18
1 files changed, 13 insertions, 5 deletions
diff --git a/demos/slider/slider_vertical.html b/demos/slider/slider_vertical.html
index d29e09b2d..875addb10 100644
--- a/demos/slider/slider_vertical.html
+++ b/demos/slider/slider_vertical.html
@@ -11,9 +11,15 @@
$(function() {
$("#slider-vertical").slider({
orientation: "vertical",
- min: 0, max: 500, value: 140
+ range: "min",
+ min: 0,
+ max: 100,
+ value: 60,
+ slide: function(event, ui) {
+ $("#amount").val(ui.value);
+ }
});
- });
+ $("#amount").val($("#slider-vertical").slider("value")); });
</script>
</head>
<body>
@@ -21,8 +27,8 @@
<div class="demo">
-<p>Volume:</p>
-<div id="slider-vertical" style="height:250px;"></div>
+<p>Volume: <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;"/></p>
+<div id="slider-vertical" style="height:200px;"></div>
</div><!-- End demo -->
@@ -30,8 +36,10 @@
<div class="demo-description">
-<p>This is an example of a vertical slider created by setting the orientation to vertical:</p> <pre>orientation: "vertical",</pre>
+<p>This is an example of a minimum range vertical slider created by setting the orientation to vertical:</p> <pre>orientation: "vertical",</pre>
<p>It's important to note that a vertical slider needs a height set. You can do this via the script options or by adding a height through CSS. </p>
+<p>This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.</p>
+
</div><!-- End demo-description -->