Home › Forums › CSS › CSS selector issues › Reply To: CSS selector issues
July 24, 2013 at 9:06 am
#144388
TheDoc
Member
With help [from here](http://stackoverflow.com/questions/8568657/wrap-stray-text-in-divs “”):
$(‘.main’).contents().each(function() {
if ( this.nodeType === Node.TEXT_NODE ) {
$(this).remove();
}
});
Codepen example: http://codepen.io/ggilmore/pen/ff8eba56cd3427e42e59c05d8477f00f