Как показать линк после того, как загрузка достигнет конца?
var bar = $('.progress-bar');
var p = $('.progress-bar-text');
var width = bar.attr('style');
console.log(width);
width = width.replace("width:", "");
width = width.substr(0, width.length - 1);
var interval;
var start = 0;
var end = parseInt(width);
var current = start;
var countUp = function() {
current++;
p.html(current + "%");
if (current === end) {
clearInterval(interval);
}
};
interval = setInterval(countUp, (1000 / (end + 1)));
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="question quest-loader quest-hiden" id="progress-bar">
<div class="progres__bar">
<span class="progress-bar" style="width:100%"></span>
<p class="progress-bar-text"></p>
</div>
<a href="#" class="question__btn" id="btn-12">Show result</a>
</div>