title: Fullcalendar - external event on click
body: <p>I have a problem with fullcalendar script. I cant get attributes of clicked divs.
  I need to get id attribute of an external event</p>
  <p>this is the div</p>
  <pre><code>&lt;div id=&quot;1303&quot; class=&quot;fc-event&quot;  data-color=&quot;#9900cc&quot;&gt;
  &lt;span class=&quot;mr-1 badge bg-orange&quot; style=&quot;width: 5%; padding-left: 0px;padding-right: 0px;&quot;&gt;-26&lt;/span&gt;Some text
  &lt;/div&gt;
  </code></pre>
  <p>this is the code on click</p>
  <pre><code>$('#external-events').on('click', '.fc-event', () =&gt; {
      const element = $(this);
      console.log(Object.keys(element));
      console.log(Object.values(element));
      console.log(Object.entries(element));
  })
  </code></pre>
  <p>and this is the result</p>
  <p><a href="https://i.stack.imgur.com/zuEEy.jpg" rel="nofollow noreferrer">Screenshot</a></p>
  <p>How can i get attributes of these divs(there are more that 1)? Where is my mistake? if i do <code>element.attr('id')</code> i get 'undefined'</p>
  <p>Thanks in advance</p>