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

92
Views
Apply IMask to created element

I want to be able to press a button and create two new inputs below the button, the first input needs to be formatted by imask as follows: 00:00:00

Currently I can only do that to the inputs I create manually. How can I add IMask configs to every created button? Here is my function that creates the inputs.

const createInputs = event => {
    var child_location = document.getElementById('inputs');

    var duration = document.createElement('input');
    duration.id = 'input1'
    child_location.parentNode.appendChild(duration);


    var title = document.createElement('input');
    title.id = 'title'
    child_location.parentNode.appendChild(title);

    var lineBreak = document.createElement('br');
    child_location.parentNode.appendChild(lineBreak);
}
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!