No need to click on an a tag to see the equation, just hover on any <a>
tag created using \eqref{label}
and that's it!
Check https://mauriciopoppe.com/notes/mathematics/calculus/derivative/ for a live demo
- index.html (the configuration I use for MathJax which enables equation numbers, see http://cdn.mathjax.org/mathjax/latest/test/sample-eqnum.html for more examples) (MathJaxV2)
- mathjaxPreview.js the scripts which enables the preview (MathJax V2)
- mathjaxPreviewV3.js the same script but with support for MathJax V3
The flickering was a styling issue, I fixed it by moving the cloned formula a little bit above the link with
For positioning it depends where your cloned element is with respect to the original one, if it's a sibling and the cloned element comes after the original then it'll be on top without any z-style fixes, I used
var container = document.body
as the container element but it could be a sibling too.