Guest User

Untitled

a guest
Nov 17th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. window.onload = (function () {
  2. var elem = (".myBar");
  3. var parent = (".parent").value;
  4. var width = 0;
  5. var id = setInterval(frame, 10);
  6. function frame() {
  7. if (width >= parent) {
  8. clearInterval(id);
  9. } else {
  10. width++;
  11. elem.style.width = width + '%';
  12. elem.innerHTML = width * 1 + '%';
  13. }
  14. }
  15. });
  16.  
  17. foreach($exs1 as $ex) {
  18. echo '<tr>';
  19. echo '<td>' . $ex['ExID'] . '</td>';
  20. echo '<td><a href="members.php?do=expenses&id='. $ex['UID'] . '">' . $ex['First_Name'] . ' ' . $ex['Last_Name'] . '</a></td>';
  21. echo '<td>' . $ex['Cost'] . '</td>';
  22. echo '<td>' . $ex['SumPay'] . '</td>';
  23. echo '<td>';
  24. echo '<div class="progress progress-striped active progress-exp"><div class="progress-bar" id="myBar">'. $ex['Percent'] .'%</div>
  25. <input type="hidden" class="parent" id="parent" name="parent" value="'. $ex['Percent'] .'" /></div>';
  26. echo '</td>';
  27. echo '</tr>';
  28. }
Add Comment
Please, Sign In to add comment