Skip to content

Instantly share code, notes, and snippets.

@rileyrichter
Created August 31, 2022 20:33
Show Gist options
  • Save rileyrichter/9a1f6c77d6df360a73b2b025019b998a to your computer and use it in GitHub Desktop.
Save rileyrichter/9a1f6c77d6df360a73b2b025019b998a to your computer and use it in GitHub Desktop.
Popover code
<!-- Add this code to the body section of custom code -->
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script type="text/javascript">
tippy("[data-template]", {
content(reference) {
const id = reference.getAttribute("data-template");
const template = document.getElementById(id);
return template.innerHTML;
},
allowHTML: true,
delay: 500,
placement: "bottom",
followCursor: "initial",
distance: 10,
duration: [0, 0],
animation: "fade",
// theme: "white",
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment