I have a progress bar built in JS and bootstrap, the code is bellow
var totalCountries = 10;
var currentCountries = 0;
var $progressbar = $("#progressbar");
$("#next, #next1").on("click", function(){
if (currentCountries >= totalCountries){ return; }
currentCountries++;
$progressbar.css("width", Math.round(100 * currentCountries / totalCountries) + "%");
});
On every button press the bar grows, I would like that when the progress bar reaches 100% to be redirected to anoither page. Any idea how to do that?