I was too quick.
The math now works when I load the page. It shows the formula correct and all. But when I input user input from textfields from the HTML, I does not work. I think it is to do with this bit:
MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
Where am I to put this? I have two seperate functions that ae triggered by buttons, where I first declare the var's that get the input from the user, then I put it together in one long straight line, and outputs it via innerHTML. And even if I add the $$, it still looks as plain HTML.