unable to display an input tag with jqMath

114 Views Asked by At

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'&lt;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:

jqMath image output

I'm not quite sure what I'm doing wrong.

0

There are 0 best solutions below