How To Get Rectangle Bounds Of Selected Text In Javascript

User Tim Down from the Stack Overflow forum provided a very handy function to get the rectangle bounds of selected text in Javascript.

This is mighty useful in cases like mine where I wanted to control the visibility of the context menu and that I required it to appear only when the mouse cursor is within the selected text bound.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *