I have an ajax request that POST
s text to another PHP page, which renders it to markdown and sends it back. An example looks like this:
"<p>Meep, meep, <em>meep!!!</em></p>
<pre><code class="language-javascript">var foo = "bar";</code></pre>"
Now, if I wanted to find all elements with the selector pre code
, how would I do that? I tried $(text).find("pre code")
but with no results given back. What is the problem and how is it done right?