I'm trying to wrap replies in a comment stream in a like this:
$('li.comment').next('li.replycomment').append('<ul class="thread">');
$('li.replycomment').next('li.comment').prepend('</ul>');
It doesn't work unfortunately. If I do the following it works no problem:
$('li.comment').next('li.replycomment').append('<ul class="thread"><li>awesome</li></ul>');
$('li.replycomment').next('li.comment').prepend('<ul><li>radical</li></ul>');
Is there a reason jQuery won't let me insert an unclosed tag?