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

152
Views
Determine if child elements available for message

So inside my JavaScript, I have the following snippet:

const map = $window.find('#map-office-' + $sender.data('office_id'));

Which gives me an output: enter image description here

Now inside the first element, there is a children attribute, which shows the following:

When the <script> tag is disabled, it shows no children.
enter image description here

When the <script> tag is enabled, it shows children.
enter image description here

How can I make it where it would act like this:

If map doesn't have children, inject a innerHTML message, otherwise render showMap function.

All help is appreciated!

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!