So I'm using the following to show div top left corner relative to mouse click location. How do I take into account if the click is near bottom of browser?
What happens now is the div appears off screen but lets me scroll down more to see div. It works but I'd rather have it smart enough to show entire div no matter where I click on browser screen.
This is what I've learned so far:
div1.style.top = (event.clientY + self.pageYOffset) + 'px';
div1.style.left = (event.clientX + self.pageXOffset) + 'px';