Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

84
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!