title: JQuery how to get <title> of a generated html
body: <p>I have a whole html document in a variable but I don't know how to get the title. Tryied the code below but it only works for specific divs and I don't know why.</p>
  
  <pre><code>//valid html
  var data='&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;meta charset="UTF-8" /&gt;&lt;title&gt;MyTitle&lt;/title&gt;&lt;meta name="description" content="MyDEsc" /&gt;&lt;/head&gt;&lt;body&gt;&lt;div id="header"&gt;header content&lt;/div&gt;&lt;div class="container" id="wrapper"&gt;Default body&lt;div id="home"&gt;home&lt;/div&gt;&lt;div id="project"&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;'
  
  console.log($(data).find('title').text()) //nothing
  console.log($('title', $(data)).text()) //nothing
  console.log('header :' + $('#header', $(data)).html()) //undefined
  console.log('header :' + $('#home', $(data)).html()) //expected value
  console.log('project :' + $('#project', $(data)).html()) //expected value
  </code></pre>
  
  <p>Demo here: <a href="http://jsfiddle.net/22RLk/" rel="nofollow">http://jsfiddle.net/22RLk/</a></p>