Anthony Pipkin![]()
Moving to 'gallery-xarno-progress-bar' and Y.Xarno.ProgressBar
A progress bar with fully customizable label and template. Custom skinning will be required for visual slider feedback. Moves the background of the slider class to simulate a progress bar. Also updates a label template if one is provided.
In this example we create a new progress bar with a custom layout and set the render to true to auto render the widget.
Then we add a custom label at position 50, this will update the label once the progress has reached at least 50, without overriding the default labels ( {0: 'Loading', 100: 'Complete'} ).
Next we create a function that will incrementally update the progress bar to simulate something happening. Normally, you would do this based on actual data feedback not a timer.
<script src="http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2011.02.09-21-32'
}).use('gallery-progress-bar', function(Y) {
Y.on('domready',function(){
var pb1 = new Y.ProgressBar({
render: true,
layout : '<div class="{labelClass}"></div><div class="{sliderClass}"></div>'
});
pb1.setLabelAt(50, 'Initializing');
(function upIt() {
var p = pb1.get('progress');
if(p <= 100) {
Y.later(1000, this, function(e){
pb1.increment(8.4);
upIt();
});
}
})();
});
});
| Subject | Author | Date |
|---|---|---|
| feedback + feature request. | Andrew Wooldridge | 12/9/10 |
| Adding a 100% animation on:end hook | Jacob Fogg | 05/11/11 |
| Re: Adding a 100% animation on:end hook | Anthony Pipkin | 05/11/11 |
| Standardizing apipkin Modules | Anthony Pipkin | 10/16/12 |
| example page doesn't show example | Marc | 11/17/12 |
| gallery-xarno-progress-bar | F21 | 03/24/13 |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info