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

94
Visualizações
Label is not updating after being appended

The following code is opening a jQuery dialog. I wish to move one of the labels (id as EventTime) close to the dialog buttons, at the bottom.

The code:

$("#FireAlert").dialog("open");
$(".ui-dialog-buttonpane").append($("#EventTime"));
function pad(val) {
    return val > 9 ? val : "0" + val;
}
eventTimer = setInterval(function () {
    $("#EventTime").text("Event time - " + pad(parseInt(eventSeconds / 3600 % 60, 10)) + ":" + pad(parseInt(eventSeconds / 60 % 60, 10)) + ":" + pad(++eventSeconds % 60));
}, 1000);

When pausing the timer and inspecting the label, it has the right text, but it is not updating in the browser, i.e. it's still showing the initialized text.

When omitting the append command, the label is updating correctly.

Sample here - https://jsfiddle.net/8s9pceg4

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