title: Can I use jQuery selectors on an HTML string that is not attached to the DOM?
body: <p>So if I have a variable like</p>
  
  <pre><code>var ht = "&lt;body&gt;&lt;p&gt;Paragraph Here&lt;/p&gt;&lt;/body&gt;"
  </code></pre>
  
  <p>If it was attached to the DOM I could just do this to get the text </p>
  
  <pre><code>$('p').text(); 
  </code></pre>
  
  <p>But can I do the same kind of selection just on a variable that has not yet been attached to the dom?</p>