Skip to content
Related Articles
Open in App
Not now

Related Articles

jQuery UI Slider change Event

Improve Article
Save Article
  • Last Updated : 23 May, 2022
Improve Article
Save Article

jQuery UI consists of GUI widgets, visual effects, and themes implemented using HTML, CSS, and jQuery. jQuery UI is great for building UI interfaces for the webpages. jQuery UI provides us a slider control through the slider widget. 

The slider widget helps us to get a certain value using a given range. We can change the slider value by sliding. The change event is used to trigger when the value of the slider is changed.

The Slider change Event accepts two values that are listed below:

  • event: It represents the event for the slider widget.
  • ui: It is of an object type that accepts three values that are –
    • handle: It represents the handle that was changed. It is of Element type.
    • handleIndex: It represents the numeric index of the handle that is moved when the slider is sliding. It is of a Number type value.
    • value: It represents the current value of the slider. It is of a number type value.


Initialize the slider with the change callback:

$( ".selector" ).slider({
    change: function( event, ui ) {}

Bind an event listener to the slidechange event:

$( ".selector" ).on( 
    function( event, ui ) {} 

CDN Link: First, add jQuery UI scripts needed for your project.

<link rel=”stylesheet” href=”//”>
<script src=”//”></script>
<script src=”//”></script>

Example: This example describes the jQuery UI Slider change Event.


<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
        jQuery UI Slider change Event
    <link rel="stylesheet" href=
    <script src="//"></script>
    <script src="//">
        h1 {
            color: green;
        #GFG {
            width: 600px;
        <h2>jQuery UI Slider change Event</h2>
        <div id="GFG"></div>
        $(function () {
            $("#GFG").on('slidechange', function () {
                alert('Change Event Triggered!');




My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!