Jquery slider disable click on slider

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:

<!DOCTYPE html>
	<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; };
	<script type="text/javascript">
	$(function() {
			range: "max",
			min: 1,
			max: 10,
			value: 2,
			slide: function(event, ui) {

<div class="demo">
        <label for="amount">Minimum number of bedrooms:</label>
        <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
    <div id="slider-range-max"></div>


What you could try is first unbind click events attached to your element, then bind new functionality onto it, something like:
$(‘.myButton’).bind(‘click’, function() {


Thanks for your solution TommiChi, but it seems that this solution doesn’t work. Or can you give the script code how you should change it?
Anyone got another solution?

Hi Mark,

I am facing the issue. I want to disable the click event on jquery slider. Have you got any solution yet? Please help me.


How were you adding the jQuery to the page, were you adding it using jQuery’s document [B].ready/B method?