public/javascripts/yui/progressbar/progressbar.js
function(parent,before) {

			if (this._rendered) { return; }
			this._rendered = true;
			
			var direction = this.get(DIRECTION);

			// If the developer set a className attribute on initialization, 
			// Element would have wiped out my own classNames
			// So I need to insist on them, plus add the one for direction.
			this.addClass(CLASS_PROGBAR);
			this.addClass(CLASS_PROGBAR + '-' + direction);

			var container = this.get('element');
			container.tabIndex = 0;
			container.setAttribute('role','progressbar');
			container.setAttribute('aria-valuemin',this.get(MIN_VALUE));
			container.setAttribute('aria-valuemax',this.get(MAX_VALUE));

			this.appendTo(parent,before);
			
					
			// I need to use the non-animated bar resizing function for initial redraw
			this._barSizeFunction = this._barSizeFunctions[0][direction];
			this.redraw();
			this._previousValue = this.get(VALUE);
			this._fixEdges();
			// I can now set the correct bar resizer
			if (this.get(ANIM)) {
				this._barSizeFunction = this._barSizeFunctions[1][direction];
			}

			this.on('minValueChange',this.redraw);
			this.on('maxValueChange',this.redraw);

			return this;
		}
function(parent,before) {

			if (this._rendered) { return; }
			this._rendered = true;
			
			var direction = this.get(DIRECTION);

			// If the developer set a className attribute on initialization, 
			// Element would have wiped out my own classNames
			// So I need to insist on them, plus add the one for direction.
			this.addClass(CLASS_PROGBAR);
			this.addClass(CLASS_PROGBAR + '-' + direction);

			var container = this.get('element');
			container.tabIndex = 0;
			container.setAttribute('role','progressbar');
			container.setAttribute('aria-valuemin',this.get(MIN_VALUE));
			container.setAttribute('aria-valuemax',this.get(MAX_VALUE));

			this.appendTo(parent,before);
			
					
			// I need to use the non-animated bar resizing function for initial redraw
			this._barSizeFunction = this._barSizeFunctions[0][direction];
			this.redraw();
			this._previousValue = this.get(VALUE);
			this._fixEdges();
			// I can now set the correct bar resizer
			if (this.get(ANIM)) {
				this._barSizeFunction = this._barSizeFunctions[1][direction];
			}

			this.on('minValueChange',this.redraw);
			this.on('maxValueChange',this.redraw);

			return this;
		}
function ( parent , before ) { if ( this . _rendered ) { return ; } this . _rendered = true ; var direction = this . get ( DIRECTION ) ; // If the developer set a className attribute on initialization,  // Element would have wiped out my own classNames // So I need to insist on them, plus add the one for direction. this . addClass ( CLASS_PROGBAR ) ; this . addClass ( CLASS_PROGBAR + '-' + direction ) ; var container = this . get ( 'element' ) ; container . tabIndex = 0 ; container . setAttribute ( 'role' , 'progressbar' ) ; container . setAttribute ( 'aria-valuemin' , this . get ( MIN_VALUE ) ) ; container . setAttribute ( 'aria-valuemax' , this . get ( MAX_VALUE ) ) ; this . appendTo ( parent , before ) ; // I need to use the non-animated bar resizing function for initial redraw this . _barSizeFunction = this . _barSizeFunctions [ 0 ] [ direction ] ; this . redraw ( ) ; this . _previousValue = this . get ( VALUE ) ; this . _fixEdges ( ) ; // I can now set the correct bar resizer if ( this . get ( ANIM ) ) { this . _barSizeFunction = this . _barSizeFunctions [ 1 ] [ direction ] ; } this . on ( 'minValueChange' , this . redraw ) ; this . on ( 'maxValueChange' , this . redraw ) ; return this ; }
Renders the ProgressBar into the given container.
If the container has other content, the ProgressBar will be appended to it.
If the second argument is provided, the ProgressBar will be inserted before the given child.
The method is chainable since it returns a reference to this instance.
@method render
@param el {HTML Element}  HTML element that will contain the ProgressBar
@param before {HTML Element}  (optional) If present, the ProgressBar will be inserted before this element.
@return {YAHOO.widget.ProgressBar}
@chainable
Renders the ProgressBar into the given container . If the container has other content the ProgressBar will be appended to it . If the second argument is provided the ProgressBar will be inserted before the given child . The method is chainable since it returns a reference to this instance .