[jQuery] Intentionally wrong nested tags?

[jQuery] Intentionally wrong nested tags?


Hi,
I have a rather long unordered list with about hundred items inside.
each is wrapped in <li>...</li>
I want to split this list into several small lists, with, say, 10
items each.
to do that I have this code:
checkvar = 1;
    $('#right ul li').each(function(){
        if( checkvar%10 == 0){
            $(this).after('</ul><ul>');
        }
        checkvar++;
    });
basically this works, but somehow jQuery fixes the order of the
inserted '</ul><ul>' to '<ul></ul>'.
interestingly, if I try to put 'zzz aaa', I get 'zzz aaa' as expected.
The moment tag-brackets are used (even with '<zzz> <aaa>' I will get
'<aaa> <zzz>' in the result.
Any suggestions whats happening here?
thanks
Tom