Skip to content Skip to sidebar Skip to footer

Jquery Ajax - Get Elements Inner Text

I have a PHP file which will return something like
Add Us On Myspace!
Add Us On Mys</div>

<h2 id="solution_1">Solution 1:

</h2>
<div class="answer-desc"><p>This should do it:</p>
<pre><code id="code_0" class="hljs language-php"><span class="hljs-keyword">var</span> <span class="hljs-variable">$html</span> = $(tab1html); <span class="hljs-comment">// parse string into DOM structure</span>
<span class="hljs-keyword">var</span> <span class="hljs-variable">$title</span> = <span class="hljs-variable">$html</span>.filter(<span class="hljs-string">); // keep the title var $image = $html.filter('#image'); // keep the image // add to whatever elements we want... $('#my_element').append($title); $('#my_other_element').append($image);

Post a Comment for "Jquery Ajax - Get Elements Inner Text"