progressbar.js 722 B

123456789101112131415161718192021222324252627282930313233
  1. /* Progress bars */
  2. function progress(percent, element) {
  3. var progressBarWidth = percent * element.width() / 100;
  4. element.find('.progressbar-value').animate({ width: progressBarWidth }, 1200);
  5. }
  6. $(document).on('ready', function() {
  7. $('.progressbar').each(function() {
  8. var bar = $(this);
  9. var max = $(this).attr('data-value');
  10. progress(max, bar);
  11. });
  12. });
  13. $(function(){
  14. $('#header-right, .updateEasyPieChart, .complete-user-profile, #progress-dropdown, .progress-box').hover(function () {
  15. $('.progressbar').each(function() {
  16. var bar = $(this);
  17. var max = $(this).attr('data-value');
  18. progress(max, bar);
  19. });
  20. });
  21. });