Skip to main content
King County logo

Add a calendar to your page with a small script.

HTML

"your-div-id" can be named anything you'd like. Just make sure it matches the variable in your JavaScript.

If you have multiple calendars on your page, you will need unique ids for each one.

<div id="your-div-id"></div>

JavaScript

If you want defaults use:

<script>
$('#your-div-id').eventsCalendar({
  calNum: 'a5hq-yx6s', //Socrata database number *Required
  numItems: 4, 
  title: 'Events',
  titleIcon: 'fa-calendar', 
  allItemsUrl: 'https://www.kingcounty.gov/about/news/events',
  allItemsText: 'See all events',
  version: 2,
  url: 'https://data.kingcounty.gov/resource/grxi-zqg2.json?display_on_kc_home_page=true'
});
</script>

About that URL above

You have a few choices about how to point to your data.