Hi I have a piece of jquery that dynamically creates an unordered list:
var get_url = "<?php echo base_url(); ?>index.php/notes/get/"+<?php echo $id;?>;
$.get(get_url, function(data) {
$.each(data,function(index, arr)
{
var opt = $('<li />');
opt.text(arr['body']);
$('#notes-list').append(opt);
});
});
This produces the correct list but I want to add < pre> tags around the text in the list item.
Can someone point me in the right direction?
I've tried opt.innerHTML = "< pre />"; but no luck.
Thanks,
Billy