Creating Responsive Popovers with Popper.js (opens in new tab)
From Mitchell Hanberg's Blog: Making simple popovers is pretty easy. Making popovers that position themselves based on the available screen real estate so they're always visible is not. Luckily JavaScript The JavaScript portion is simple. The Popper constructor takes a DOM node to attach the popover to and a DOM node that will be the body of the popover. // index.js const attachmentNode = document.querySelector("#attachment-point"); const popoverNode = document.querySelector("#my-popover"); c...
Read the original article