aboutsummaryrefslogtreecommitdiffstats
path: root/demos/slider/steps.html
diff options
context:
space:
mode:
Diffstat (limited to 'demos/slider/steps.html')
-rw-r--r--demos/slider/steps.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/demos/slider/steps.html b/demos/slider/steps.html
index fe516a892..bc284556a 100644
--- a/demos/slider/steps.html
+++ b/demos/slider/steps.html
@@ -10,16 +10,21 @@
<script type="text/javascript">
$(function() {
$("#slider").slider({
- min: 0, max: 500, step: 50
+ min: 0,
+ max: 500,
+ step: 50,
+ slide: function(event, ui) {
+ $("#amount").val('$' + ui.value);
+ }
});
- });
+ $("#amount").val('$' + $("#slider").slider("value")); });
</script>
</head>
<body>
<div class="demo">
-<p>Donation amount ($50 increments):</p>
+<p>Donation amount ($50 increments): <input type="text" id="amount" /></p>
<div id="slider"></div>
</div><!-- End demo -->