MathJax does not support the LaTeX \begin{picture}...\end{picture} environment, so the solution suggested in the stackexchange discussion won't work. I would suggest you look at using XYJax, which incorporates MathJax into pictures generated by XYPic. Here is a link:
https://github.com/sonoisa/XyJax
There are some other graphing options that work with MathJax as well, such as JSXGraph, but I think XYJax is probably best suited to your needs.