Thanks for stopping by jonatansamuelsson.com!
Here you can find information about my current and past musical & graphical projects.
Feel free to drop me a line!
Best regards
/Jonatan “Jono” Samuelsson
document.addEventListener('DOMContentLoaded', function() { const events = document.querySelectorAll('.event'); // Använd rätt klassnamn från EventIgniter const now = new Date(); const upcomingContainer = document.querySelector('#upcoming-events'); const pastContainer = document.querySelector('#past-events'); events.forEach(event => { const eventDate = new Date(event.getAttribute('data-date')); // Kolla om EventIgniter sätter data-attribut för datum // Jämför datumet med dagens datum if (eventDate >= now) { upcomingContainer.appendChild(event); } else { pastContainer.appendChild(event); } }); });
Thanks for stopping by jonatansamuelsson.com!
Here you can find information about my current and past musical & graphical projects.
Feel free to drop me a line!
Best regards
/Jonatan “Jono” Samuelsson