title: Render a string via Mathjax
body: <p>I have an text area that where I expect the user to enter the mathematical expression. I wan't to render any results immediately, just like it works here on SO.<br>
  Something like:</p>
  
  <pre><code>&lt;div id="preview"&gt;&lt;/div&gt;
  
  function onkeyup(event) {
      var prev = document.getElementById("preview");
      Using just a HTML string:
      prev.innerHTML = MathJax.renderString(this.value);
  
      ... or get DOM object tree instead:
      //Remove previous children
      prev.innerHTML = "";
      //Append new DOM tree
      var tree = MathJax.createDOM(this.value);
      prev.appendChild(tree);
  }
  </code></pre>
  
  <p>Is that possible? Or will I have to put <code>this.value</code> in some div element and than have MathJax parse that element? (that would be stupid)</p>