I found this solution while I was researching something else. It's part of an "Introduction to jQuery" by the creator of jQuery and uses the end() function.
$("") // li
.find("a") // a
.attr("href", "http://ejohn.org/") // a
.html("John Resig") // a
.end() // li
.appendTo("ul");
Applying to your question it would be ...
$("
") // div
.addClass("inner") // div
.find("span") // span
.html("whatever you want here.") // span
.end() // div
.appendTo( elem );