Get started with timelinejs CDN

MPL-2.0 licensed

TimelineJS is an open-source web application for creating and displaying interactive, responsive timelines.

Tags:
  • timeline

Stable version

Copied!

How to start using timelinejs CDN


<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/timeline3/css/timeline.css">
  <title>Get started with timelinejs CDN - cdnhub.io</title>
</head>
<body>
  <div id="timeline"></div>
  <script src="https://cdn.cdnhub.io/timelinejs/3.9.3/js/timeline-min.js"></script>
  <script>
    const timeline = new vis.Timeline('timeline', {
      start: '2020-01-01',
      end: '2020-12-31'
    });

    const events = [
      {
        id: 'event1',
        content: 'Event 1',
        start: '2020-01-15',
        end: '2020-01-20'
      },
      {
        id: 'event2',
        content: 'Event 2',
        start: '2020-06-01',
        end: '2020-06-10'
      },
      {
        id: 'event3',
        content: 'Event 3',
        start: '2020-11-15',
        end: '2020-11-20'
      }
    ];

    timeline.add({ events });
  </script>
</body>
</html>

All versions