JSFiddle - React, Tailwind, and code Playground

HTML

<div id="outer1">
<div id="inner1"></div>
<div id="inner2"></div>
</div>
<div id="outer2"></div>

<dl id="log">
<dt>$("#outer1 + *, #inner1 + *")</dt>
<dt>$("#outer1, #inner1").find("+ *")</dt>
</dl>

JavaScript

$("#log > dt").each(function(){
    var $this = $( this );
    $this.after( $("<dd/>").text(
        $.map( eval( $this.text() + ".get()" ), function( el ) {
            return "#" + el.id;
        }).join()
    ) );
});