I was wondering if it were possible to, instead of selecting an element from the DOM via a jQuery selector, if I can create one instead.
For example:
I don't see something out there that would create elements off of css selector syntax. JQuery does let you create and add elements, but the syntax is not based off of the css selectors as in your example. For instance to add a #hello div with class a and b after the #test div, you can use .after():
$('#test').after("Hello");
jsfiddle: http://jsfiddle.net/septerr/RmAW6/
or
$('#test').after('Hello').attr('id', 'hello').addClass('a').addclass('b');
jsfiddle: http://jsfiddle.net/septerr/EQjLE/