Syntax for object with multiple elements

Syntax for object with multiple elements

Hello,
I'm quite new to jquery and i would like to know the best syntax to create an object with couple of DOM elements.
I mean something like this:

  1. $('<div/>').append(newBlock());
  2. /////
  3. function newBlock()
  4. {
  5.       var $block =$( $('<h1/>')
  6.                               .text('Title'), //????
  7.                          $('<h2/>')
  8.                                .text('subTitle'));
  9.       return $block;
  10. }
I know this synthax isnt correct, but thats give you the idea of what i mean.

I can get it work like this but its really weird:

  1. $('<div/>').append(newBlock());
  2. /////
  3. function newBlock()
  4. {
  5.       var h1  = $('<h1/>')
  6.                          .text('Title');
  7.       var h2  = $('<h2/>')
  8.                           .text('subTitle');
  9.       return $("<div>").append(h1.clone()).html()+$("<div>").append(h2.clone()).html();
  10. }
Could someone point me to the right direction, thx!