Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article Sliders Disabled Option

  • Last Updated : 20 Nov, 2020

The library is a cross-browser library that aims to improving the user interface of a website. The Slider controls are thin tracks that allow the user to input values. It is done by defining a range of values that can be selected by the user by dragging the handle to the appropriate value.

The Sliders disabled option is used to define whether the given slider is disabled or not. A disabled slider would be locked and hence not be able to be moved by the user. This option accepts a boolean value, where a value of true specifies the slider to be disabled and false specifies that it is not disabled.

Hey geek! The constant emerging technologies in the world of web development always keeps the excitement for this subject through the roof. But before you tackle the big projects, we suggest you start by learning the basics. Kickstart your web development journey by learning JS concepts with our JavaScript Course. Now at it's lowest price ever!


{ disabled: boolean }


  • boolean: This is a boolean value that specifies whether the slider is disabled or not.



<!DOCTYPE html>
    <!-- Include the required scripts -->
    <script type="text/javascript" 
    <script type="text/javascript" 
        src="scriptaculous.js?load = slider">
    <!-- Style the Sliders so that they
        are properly visible -->
    <style type="text/css">
        .track {
            width: 250px;
            background-color: gray;
            height: 5px;
            position: relative;
        .track .handle {
            width: 20px;
            height: 10px;
            background-color: green;
            cursor: move;
            position: absolute;
            top: -2px;
        .pad {
            padding: 25px;
    <h1 style="color: green;">
    <h2>Sliders disabled</h2>
        The slider can be disabled or enabled 
        using the "disabled" option.
    <div class="pad">
        <div id="track-hor" class="track">
            <div id="handle-hor" class="handle">
    <div class="pad">
        <div id="track2-hor" class="track">
            <div id="handle2-hor" class="handle">
    <script type="text/javascript">
        new Control.Slider('handle-hor',
            'track-hor', {
            range: $R(1, 10),
            sliderValue: 5,
            // This will disable the Slider
            // and it will be locked
            disabled: true
        new Control.Slider('handle2-hor',
            'track2-hor', {
            range: $R(1, 10),
            sliderValue: 5,
            // This will enable the Slider
            // to be used
            disabled: false


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!