Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

155
Visualizações
Progress bar not working using jquery and html

I have implemented a progress bar on my multi-step form. But after submitting form progress bar is not showing as page reload. Find my code below.

$(document).ready(function() {
    $('#myBtn').click(function(){
        animateProgressBar(90);
 //mybtn is the button id of submit button in form   
    
    
    });
function animateProgressBar(percentageCompleted)
{

$('#innerDiv').animate({
   
'width':(1000*percentageCompleted)/100 


},1000);
$({counter: 1}).animate({counter:percentageCompleted},{duration:1000,
step:function()
{
    $('#innerDiv').text(Math.ceil(this.counter)+'%');
}

})
}

});
 <div id="outerDiv" style="background-color:white; height:20px; width:1000px; padding:5px;">
        <div id="innerDiv" style="background-color:#138581; height:19px; width:0px; color:white; text-align:center;"> </div></div>

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can use localStorage to persist the progress between page reloads.

Use window.localStorage.setItem('progress', 90); to set the progress of the current step in your form.

User window.localStorage.getItem('progress') to retrieve the progress you set previously.

So you would set the current progress in the localStorage, and on each refresh you retrieve it and show it again.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda