is there a way to create/add multiple elements at once? In the following example I would like span and ul to be both innerHTML properties of li:
jQuery('<li/>', {
html: jQuery('<span/>', {
text: 'a',
}), jQuery('<ul/>', {
text: 'b',
})
}).appendTo("#t");
I would like to do it in one call, without having to pass a string of HTML (which I did before).
Thanks
You could do: