Need to autogenerate a jqMath formula with input tag in it. I took some of the code from the example provided by jqMath. Here is the code:
var $el = $('body').find('div#mydiv.main');
$el.html('');
$el.append(
$("<p>\"If $$y = ax^\html'<input type=\"text\" size=1>'+bx+c=0$$ with $a≠0$, then:$$x={-b±√{b^2-4ac}}/{2a}$$\"</p>")
);
Per jqMath instructions, I do have the following line in my HTML
<script>M.MathPlayer = false; M.trustHtml = true;</script>
However what I get looks like this:
I'm not quite sure what I'm doing wrong.
$$y = ax^\\html'<input type=\"text\" size=1>'+bx+c=0$$ with $a≠0$, then:$$x={-b±√{b^2-4ac}}/{2a}$$
") );` Don't append as $(""), but append as and use `\\html` instead of `\html` – flashburn Oct 26 '17 at 23:55