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

154
Visualizações
How to Use Jquery Smart Wizard with some ajax pages

I am having difficulty in understanding how to use the jQuery smart wizard.

I have managed to get it going with static html for my first three tabs but I now want to add another tab which uses an ajax call to get the data based on the data I have collected in the previous tabs.

I know there are callback functions for leaving and entering steps but the documentation is unclear on how to use them (or it maybe I don't understand enough jQuery/JavaScript to correctly interpret the documentation)

The way I read it is I would use

$("#smartwizard").on("stepContent", function(e, anchorObject, stepIndex, stepDirection) {
   // if this is the correct step index then
   // do my ajax call using a promise 
   // (Which I do not understand fully how to do. 
   // I have never used a promise before.)
   // and return my html. (Where is the html going to be put? is it the 'tabpanel'?)
   return myHTMLfromtheajaxcall;
  // else do nothing
  // How do I stop it overriding the existing content?
  // Do I return '' or false or what?
});

What and where do the parameters for the function come from. What is 'e'? What is 'anchorObject'? The other parameters are self explanatory.

I hope somebody can explain things in simple terms with some examples.

Thank you in advance.

about 4 years ago · Juan Pablo Isaza
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