I have encountered an issue with my progress bars on the webpage. The static HTML version works perfectly fine, but the dynamically created one using jQuery seems to be instantly at 100% without any delay in progression.
To illustrate the problem better, here is a snippet of the code: https://jsfiddle.net/gezgind/DTcHh/7133/
HTML:
<div class="container">
<div id="reportbars">
<div class="progress" style="width:500px;margin-bottom:0px;margin-top:20px;">
<div class="progress-bar" id="tracking" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 0%;transition-duration: 3s;">
<span style="visibility:hidden">xxxx</span>
</div>
</div>
<button id="report_start" type="button" class="btn btn-default">Start</button>
</div>
JavaScript:
$("#report_start").click(function(){
$("#reportbars").append(
'<div class="progress" style="width:500px;margin-bottom:0px;margin-top:20px;">' +
'<div class="progress-bar" id="tracking1" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 0%;transition-duration: 3s;">' +
'<span style="visibility:hidden">Tracking 950.325</span>' +
'</div></div>'
);
$("#tracking").css("width","100%");
$("#tracking1").css("width","100%");
});
Any suggestions on how to address this issue would be greatly appreciated.