Skip to content

Latest commit

 

History

History
39 lines (34 loc) · 1.1 KB

events.md

File metadata and controls

39 lines (34 loc) · 1.1 KB
layout title permalink
page
Events
/events/

Toronto

<script> let options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', timeZoneName: 'short', hour: 'numeric' }; const showLinks = (id, data) => { let event = { name: data.name, link: data.link, time: new Date(data.time).toLocaleString('en-US', options) } if (!document.querySelector(`#${id}`)) return document.querySelector(`#${id}`).insertAdjacentHTML('beforeend', ` ${event.name}
${event.time}

`) } const handleResponse = (id, response) => { response.data.forEach(data => { showLinks(id, data); }) } const callbackToronto = response => { handleResponse('upcoming-events-toronto', response) } </script> <script type="text/javascript" src="https://api.meetup.com/Toronto-Code-Mentoring/events?page=2&callback=callbackToronto"></script>