<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 -->