Why isn't jQuery.append working?
<p>I am in the middle of creating a small script to 'help' me with my homework. It uses jQuery. The script (so far) is below:</p>

<pre><code>var s = document.createElement('script');
document.body.appendChild(s);
s.src = "http://code.jquery.com/jquery-latest.js"; // Include jQuery

var tmp_1 = document.embeds[0].GetVariable("q1answers"); // Read raw values
var answers_1 = tmp_1.split(","); // Explode into array
answers_1.splice(0,1); // Remove first element (always 0)

var tmp_2 = document.embeds[0].GetVariable("q2answers");
var answers_2 = tmp_2.split(",");
answers_2.splice(0,1);

answers_1.push("LINE_BREAK");
var answers = answers_1.concat(answers_2);

$("body").append("&lt;div id='answers-wrap'&gt;&lt;/div&gt;");
$("#answers-wrap").css("position", "fixed");
$("#answers-wrap").css("background", "none");
</code></pre>

<p>The problem arises when it gets to the 3rd-to-last line. Chrome console claims that <code>Object #&lt;HTMLBodyElement&gt; has no method 'append'</code>, however if I extract that line and put it into the console on its own, it works fine. I can use a different method to insert HTML, but I would like to know what isn't working with this one.</p>

<p>Thanks in advance!</p>
