<!doctype html> <html lang = "en"> <head> <meta charset = "utf-8"> <title>jQuery UI Slider functionality</title> <link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel = "stylesheet"> <script src = "https://code.jquery.com/jquery-1.10.2.js"></script> <script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <!-- Javascript --> <script> $(function() { $( "#slider-6" ).slider({ range:true, min: 0, max: 500, values: [ 35, 200 ], start: function( event, ui ) { $( "#startvalue" ) .val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] ); }, stop: function( event, ui ) { $( "#stopvalue" ) .val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] ); }, change: function( event, ui ) { $( "#changevalue" ) .val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] ); }, slide: function( event, ui ) { $( "#slidevalue" ) .val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] ); } }); }); </script> </head> <body> <!-- HTML --> <div id = "slider-6"></div> <p> <label for = "startvalue">Start:</label> <input type = "text" id = "startvalue" style = "border:0; color:#b9cd6d; font-weight:bold;"> </p> <p> <label for = "stopvalue">Stop:</label> <input type = "text" id = "stopvalue" style = "border:0; color:#b9cd6d; font-weight:bold;"> </p> <p> <label for = "changevalue">Change:</label> <input type = "text" id = "changevalue" style = "border:0; color:#b9cd6d; font-weight:bold;"> </p> <p> <label for = "slidevalue">Slide:</label> <input type = "text" id = "slidevalue" style = "border:0; color:#b9cd6d; font-weight:bold;"> </p> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more