}).progressbar("value", 5);
});
+test( "complete", function() {
+ expect( 3 );
+ var changes = 0,
+ value;
+
+ $( "#progressbar" ).progressbar({
+ change: function() {
+ changes++;
+ same( $( this ).progressbar( "value" ), value, "change at " + value );
+ },
+ complete: function() {
+ equal( changes, 2, "complete triggered after change" );
+ }
+ });
+
+ value = 5;
+ $( "#progressbar" ).progressbar( "value", value );
+ value = 100;
+ $( "#progressbar" ).progressbar( "value", value );
+});
+
})(jQuery);
this.options.value = value;
this._refreshValue();
this._trigger( "change" );
+ if ( this._value() === this.max ) {
+ this._trigger( "complete" );
+ }
}
$.Widget.prototype._setOption.apply( this, arguments );