Created
January 13, 2016 01:52
-
-
Save pdparker/7824e2e6709207391049 to your computer and use it in GitHub Desktop.
jQuery Range Slider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>jQuery UI Slider - Range slider</title> | |
| <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> | |
| <script src="//code.jquery.com/jquery-1.10.2.js"></script> | |
| <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> | |
| <!--Range slder --> | |
| <script> | |
| $(function() { | |
| $( "#qid1" ).slider({ | |
| range: true, min: -1, max: 101, values: [ -1, 101 ], | |
| slide: function( event, ui ) { | |
| $( "#amount" ).val(ui.values[ 0 ] + "% - " + ui.values[ 1 ] + "%"); | |
| } | |
| }); | |
| $( "#amount" ).val( "Move Right" + " - " + "Move Left"); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <p> | |
| <label for="amount">Probability:</label> | |
| <input type="text" id="amount" readonly style="border:0; color:#f6931f; font-weight:bold;"> | |
| </p> | |
| <div id="qid1"></div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment