I've got the following problem:
I have a Jquery slider and I want to disable the click on the slider.
I only want to change the slider when I click and drag the pointer.
Standard you can also click everywhere on the slider and the pointer will go to that point. That I don't want..
Can someone help me?
This is the code:
Code HTML4Strict:<!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <style type="text/css"> div.demo { padding: 10px !important; }; </style> <script type="text/javascript"> $(function() { $("#slider-range-max").slider({ range: "max", min: 1, max: 10, value: 2, slide: function(event, ui) { $("#amount").val(ui.value); } }); $("#amount").val($("#slider-range-max").slider("value")); }); </script> </head> <body> <div class="demo"> <p> <label for="amount">Minimum number of bedrooms:</label> <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" /> </p> <div id="slider-range-max"></div> </div> </body> </html>


.





Bookmarks