Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

145
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda