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

151
Visualizações
Fullcalendar - external event on click

I have a problem with fullcalendar script. I cant get attributes of clicked divs. I need to get id attribute of an external event

this is the div

<div id="1303" class="fc-event"  data-color="#9900cc">
<span class="mr-1 badge bg-orange" style="width: 5%; padding-left: 0px;padding-right: 0px;">-26</span>Some text
</div>

this is the code on click

$('#external-events').on('click', '.fc-event', () => {
    const element = $(this);
    console.log(Object.keys(element));
    console.log(Object.values(element));
    console.log(Object.entries(element));
})

and this is the result

Screenshot

How can i get attributes of these divs(there are more that 1)? Where is my mistake? if i do element.attr('id') i get 'undefined'

Thanks in advance

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