simple question mainly for simplifying purposes but…
currently using
var categoryList = [];
$('#share').children().each(function() {
categoryList.push($(this).html());
});
I was curious if there was a way to just populate the array in 1 go… I realize that the .children() does return an array, but I guess the complexity comes from the fact that I need the .html or .text of each child (either would suffice).
If what you want is the combined HTML of all the children, you can either just do this to get the HTML for the whole object:
or this to get the concatenated HTML of all the children (without their individual tags):