How can I group all items with as-selection-item class and wrap them in <li class="thelist"><ul></ul></li> ?

jasmine's Avatar

jasmine

24 Jun, 2013 01:56 PM

Hi
How can I group all items with as-selection-item class and wrap them in <li class="thelist"><ul></ul></li> ?
I couldnt do this with below code.
$('.as-selections').each(function(i, ul) {
    $('.as-selection-item', ul).wrapAll('<li><ul></ul></li>');
});
Thanks in advance

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac