ElementsByClassName("annotation-link")
        if (tmp.length === 1) {
          tmp[0].remove()
        }
        
        if (event.currentSlide.classList.contains("annotation")) {
          event.currentTarget.append(annotation_div)
        }
      } );

    </script>
    
    <script>
      // htmlwidgets need to know to resize themselves when slides are shown/hidden.
      // Fire the "slideenter" event (handled by htmlwidgets.js) when the current
      // slide changes (different for each slide format