<buttonid="button"aria-describedby="tooltip">I'm a button</button> <divid="tooltip"role="tooltip">I'm a tooltip</div>
<scriptsrc="https://unpkg.com/@popperjs/core@2"></script> <script> const button = document.querySelector('#button'); const tooltip = document.querySelector('#tooltip'); // Pass the button, the tooltip, and some options, and Popper will do the // magic positioning for you: Popper.createPopper(button, tooltip, { placement: 'right', }); </script>