MathJax with Tooltips

MathJax does not support tooltips by default. This is a sample that allows even overlapping tooltips.

$$ \newcommand{\target}[2]{\class{mathjax-symbol mathjax-symbol-#1}{#2}} $$
Posterior
Likelihood
Prior
Evidence
$$P$$
$$A$$
$$B$$
Normal Math: $$P(A\mid B) = \frac{P(B\mid A)P(A)}{P(B)}$$ Math with Tooltip: (Mouse hover to see tooltip) $$ \target{posterior}{P(A\mid B)}= \frac{ \target{likelihood}{P(B\mid A)}\target{prior}{P(A)} }{ \target{evidence}{P(B)} } $$ Math with Overlapped Tooltip: (Mouse hover to see tooltip) $$ \target{posterior}{ \target{p}{P}(\target{a}{A}\target{bar}{\mid} \target{b}{B}) } = \frac{ \target{likelihood}{\target{p}{P}(\target{b}{B}\target{bar}{\mid} \target{a}{A})}\target{prior}{\target{p}{P}(\target{a}{A})} }{ \target{evidence}{\target{p}{P}(\target{b}{B})} } $$