State Maintenance in JQuery ProgressBar widget

23 Nov 20171 minute to read

Save current model value to cookies for State Maintenance. While refreshing the ProgressBar widget, page retains the model value applied from browser cookies. By default, the enablePersistence property is set to ‘false’ in the ProgressBar.

The following steps explain the State Maintenance in the ProgressBar control.

In the HTML page, add a <div> element to render the ProgressBar widget.

  • HTML
  • <div class="control">
        <div id="progressbar"></div>
  • // Add the following script to enable State Maintenance.
        $(function () {
                enablePersistence: true,
                value: 40,
                width: 500,
                height: 40
            var progress = $("#progressbar").data("ejProgressBar");
            progress.setModel({ text: progress.getValue() + " %" });

    The following screenshot displays the output.