jQuery: Adding HTML inside a dynamic list
<p>Hi I have a piece of jquery that dynamically creates an unordered list:</p>

<pre><code>var get_url = "&lt;?php echo base_url(); ?&gt;index.php/notes/get/"+&lt;?php echo $id;?&gt;;

$.get(get_url, function(data) {

$.each(data,function(index, arr)
   {
      var opt = $('&lt;li /&gt;'); 

      opt.text(arr['body']);
      $('#notes-list').append(opt);
   });
});
</code></pre>

<p>This produces the correct list but I want to add &lt; pre> tags around the text in the list item.</p>

<p>Can someone point me in the right direction?</p>

<p>I've tried opt.innerHTML = "&lt; pre />"; but no luck.</p>

<p>Thanks,</p>

<p>Billy</p>
