visible items</button>
<div>
  <h2>visible items:</h2>
  <h3 id="visibleItemsContainer"></h3>
</div>

<div id="mytimeline"></div>
<br>

<script>
  function showVisibleItems() {
    var a = timeline.getVisibleItems();
    console.log(a);
    document.getElementById("visibleItemsContainer").innerHTML = ""
    document.getElementById("visibleItemsContainer").innerHTML += a;
  };

  // get selected item count from url parameter
  var count = 1000;

  // create groups
  var groups = new vis.DataSet([
    {id: 1,