2👍
✅
it’s is how .wrap works, it appears the element must in the DOM to work, but anyway, there’s no need to wrap it at all, u can just create whatever u want inside the map.
an example here – https://jsfiddle.net/oborudko/eo5x0unr/
$('#features').empty().append(features[$(this).val()].map(feature => $('<div class="checkbox"><label>' +
'<input type="checkbox" name="features[]" value="' + feature.id + '"/>' + feature.name +
'</label>')
));
});
Source:stackexchange.com