jQuery UI & Slider: Range with fixed minimum

This entry is part 6 of 11 in the series jQuery UI Slider

jQuery UI Slider – Range with fixed minimum

Fix the minimum value of the range slider so that the user can only select a maximum.

Set the range option to “min.”

When you move the slider, you are now selecting the maximum value.

<!doctype html>
<html lang='en'>
    <meta charset='utf-8'>
    <title>jQuery UI Slider - Range with fixed minimum</title>
    <link rel='stylesheet' href='//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css'>
    <script src='//code.jquery.com/jquery-1.10.2.js'></script>
    <script src='//code.jquery.com/ui/1.10.4/jquery-ui.js'></script>
    <link rel='stylesheet' href='http://codecrawl.com/code/jqueryui/jqueryui_style.css'>
        $(function () {
                range: 'min',
                value: 37,
                min: 1,
                max: 700,
                slide: function (event, ui) {
                    $('#amount').val('$' + ui.value);
            $('#amount').val('$' + $('#slider-range-min').slider('value'));

    <label for='amount'>Maximum price:</label>
    <input type='text' id='amount' style='border:0; color:#f6931f; font-weight:bold;'>

<div id='slider-range-min'></div>

Try The Code Slider Widgets API Doc
Series Navigation<< jQuery UI & Slider: Colorpicker
jQuery UI & Slider: Multiple sliders >>

Leave a comment

Leave a Reply