Permalink
Browse files

Progressbar: Add complete event

  • Loading branch information...
kborchers committed Nov 20, 2012
1 parent 3236dcd commit 8773a33644a2a26c25f31e66f717eb61bdf9fd2b
Showing with 4 additions and 1 deletion.
  1. +4 −1 ui/jquery.ui.progressbar.js
@@ -113,7 +113,7 @@ $.widget( "ui.progressbar", {
},
_refreshValue: function() {
- var value = this.value(),
+ var value = this.options.value,
percentage = this._percentage(),
overlay = this.valueDiv.children().eq( 0 );
@@ -124,6 +124,9 @@ $.widget( "ui.progressbar", {
this.oldValue = value;
this._trigger( "change" );
}
+ if ( value === this.options.max ) {
+ this._trigger( "complete" );
+ }
this.valueDiv
.toggle( this.indeterminate || value > this.min )

0 comments on commit 8773a33

Please sign in to comment.