Skip to content

Commit 7aeb32c

Browse files
committed
demos/slider/steps.html: addded a text input for feedback
1 parent 0e11d30 commit 7aeb32c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

demos/slider/steps.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@
1010
<script type="text/javascript">
1111
$(function() {
1212
$("#slider").slider({
13-
min: 0, max: 500, step: 50
13+
min: 0,
14+
max: 500,
15+
step: 50,
16+
slide: function(event, ui) {
17+
$("#amount").val('$' + ui.value);
18+
}
1419
});
15-
});
20+
$("#amount").val('$' + $("#slider").slider("value")); });
1621
</script>
1722
</head>
1823
<body>
1924

2025
<div class="demo">
2126

22-
<p>Donation amount ($50 increments):</p>
27+
<p>Donation amount ($50 increments): <input type="text" id="amount" /></p>
2328
<div id="slider"></div>
2429

2530
</div><!-- End demo -->

0 commit comments

Comments
 (0)