Widget factory extension of the jquery ui progress bar doesn't affect look of a div on a jsfiddle

65 views Asked by At

I wanted to extend a progress bar using Widget Factory. When I tried sample script presented on JQuery site and copied it to jsfiddle it doesn't work. There are no errors.

JSFiddle: https://jsfiddle.net/tuoqes7h

HTML:

<div id="a">
bla
</div>

SCRIPT:

$.widget("custom.progressbar", {
  _create: function() {
    var progress = this.options.value + "%";
    this.element
      .addClass("progressbar")
      .text(progress);
  }
});


$(function() {
  $("#a").progressbar({
    value: 25
  });
});
0

There are 0 answers