understading complex animate function .
was just going through the source of Jbox and saw the following lines of code:
- this.wrapper.stop().animate({opacity: 0}, {
- queue: false,
- duration: this.options.fade,
- start: function() {
- this.isClosing = true;
- }.bind(this),
- complete: function() {
- this.wrapper.css({display: 'none'});
- this.options.onCloseComplete && (this.options.onCloseComplete.bind(this))();
- this.options._onCloseComplete && (this.options._onCloseComplete.bind(this))();
- }.bind(this),
- always: function() {
- this.isClosing = false;
- }.bind(this)
- });
how can this be correct ? should't the complete function come after the 2nd object leteral , I.E. not inside it , but outside it , also whats with these functions start, and always ? what are these functions for ?
Thank you.
Gautam.