Created
August 31, 2022 20:33
-
-
Save rileyrichter/9a1f6c77d6df360a73b2b025019b998a to your computer and use it in GitHub Desktop.
Popover code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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