Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onload = (function () {
- var elem = (".myBar");
- var parent = (".parent").value;
- var width = 0;
- var id = setInterval(frame, 10);
- function frame() {
- if (width >= parent) {
- clearInterval(id);
- } else {
- width++;
- elem.style.width = width + '%';
- elem.innerHTML = width * 1 + '%';
- }
- }
- });
- foreach($exs1 as $ex) {
- echo '<tr>';
- echo '<td>' . $ex['ExID'] . '</td>';
- echo '<td><a href="members.php?do=expenses&id='. $ex['UID'] . '">' . $ex['First_Name'] . ' ' . $ex['Last_Name'] . '</a></td>';
- echo '<td>' . $ex['Cost'] . '</td>';
- echo '<td>' . $ex['SumPay'] . '</td>';
- echo '<td>';
- echo '<div class="progress progress-striped active progress-exp"><div class="progress-bar" id="myBar">'. $ex['Percent'] .'%</div>
- <input type="hidden" class="parent" id="parent" name="parent" value="'. $ex['Percent'] .'" /></div>';
- echo '</td>';
- echo '</tr>';
- }
Add Comment
Please, Sign In to add comment