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

212
Views
How do I get the innerHTML while ignoring child elements?

I have an HTML div element with an innerHTML of x number. Through javascript, I add children to the element with their own innerHTML and append it to the existing div. But I can no longer call innerHTML to get the x in an easy way. This is probably a popular question but I haven't found a solution that actually works. Is there any elegant way to do this with vanilla js or jquery? If there are any workaround like creating a variable that would be fine with me, but innerHTML I think is a good way to have both a variable and a visual representation.

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!