title: jQuery put dynamically created list inside <ul> tags
body: <p><code>.append()</code> does not seem to do the trick, it place both <code>&lt;ul&gt;</code>&amp;<code>&lt;/ul&gt;</code> at the the top.
  how should I do it?</p>
  
  <p>(The <code>fullQuestion</code> is only one <code>&lt;li&gt;</code> it is generated for avery question)</p>
  
  <pre><code>function writeQuestions() {
  
  $('#container').append("&lt;ul&gt;\n");
  
  len = questions.qestion.length;
  for (var i = 0; i &lt; len; i++) {
  
          var answerRdy = [];
          var qestionRdy = questions.qestion[i];
          answerRdy[0] = questions.answer[i][0];
          answerRdy[1] = questions.answer[i][1];
          answerRdy[2] = questions.answer[i][2];
          answerRdy[3] = questions.answer[i][3];
          var divID = "question-" + i;
          var formID = "form-" + i;
          var CurrentForm = i;
  
              var writeAnswer = [];
              writeAnswer[writeAnswer.length] = ("\n&lt;br /&gt;`&lt;li id='{0}'&gt;`\n&lt;form id='{1}' name='{2}'&gt;\n").format(divID, formID, CurrentForm);
              writeAnswer[writeAnswer.length] = ("&lt;b&gt;" + qestionRdy + "&lt;/b&gt;&lt;br /&gt;\n");
          for (var n=0; n&lt;=3; n++) {
              writeAnswer[writeAnswer.length] = ("&lt;input type='radio' name='answerN' value='{0}' /&gt; {1} &lt;br /&gt;\n").format(n, answerRdy[n]);
                  }
              writeAnswer[writeAnswer.length] = ("&lt;input type='submit' value='Submit your answer'&gt;\n&lt;/form&gt;\n&lt;/li&gt;&lt;!--{0}--&gt;").format(divID);
  
  
          var joinQuestion = writeAnswer.join();
      //  var joinQuestion = "&lt;ul&gt;\n" + joinQuestion + "\n&lt;/ul&gt;"
              exp = /,/gi;
          var fullQuestion = joinQuestion.replace(exp, "");
  
      $('#container').append(fullQuestion);
  }
  
  for (var i=0; i &lt; len; i++) {
      var formID = document.forms["form-" + i];
      $(formID).bind("submit", validate);
  }
  
  $('#container').append("\n&lt;/ul&gt;");
  </code></pre>
  
  <p>}</p>