Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <title>jQuery UI Slider - Range with fixed maximum</title>
- <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
- <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
- <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
- <!-- <link rel="stylesheet" href="/resources/demos/style.css" /> -->
- <script>
- $(function() {
- $( "#slider-savings" ).slider({
- range: "max",
- min: 10,
- max: 1000,
- value: 20,
- step: 5,
- slide: function( event, ui ) {
- $( "#amount" ).val( ui.value );
- }
- });
- $( "#amount" ).val( $( "#slider-savings" ).slider( "value" ) );
- });
- </script>
- </head>
- <body>
- <p>
- <label for="amount">Amount Saved Each Day: £</label>
- <input type="text" id="amount" style="border: 0; color: #f6931f; font-weight: bold;" />
- </p>
- <div id="slider-savings"></div>
- <p>
- <label for="amount">Amount Saved Per Month: £</label>
- </p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment