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

252
Views
How to edit a button element that was added as an appendChildElement(). and convert it to a font awesome icon

The document was added as using javascript:

      const task_edit_el = document.createElement("button");
      task_edit_el.classList.add("edit");
      task_edit_el.innerHTML = "Edit";

Now this creates a button element with the inner html Edit. how do i change the inner html to a font awesome icon? since its not showing on the normal html page. it is manipulated to mount when a button is clicked.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You need to create an "i" element inside in the button scope, after add class and finally add this i element to button element using add child.

<button><i class="fa-thin fa-alarm-clock"></i> Alarm</button>

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