get only specific innerHtml
<p>as far i know how to get innerHTML but now i want to get only specified tags. let say i only want those line of tags who contains <code>test-class</code>.</p>

<pre><code>&lt;div id="parent"&gt;
  &lt;div class="test-class"&gt; some texts &lt;/div&gt;

  &lt;div class="class_1"&gt; some text &lt;/div&gt;
&lt;/div&gt;

$(functio() {
   $('#parent').html();   
}); 
</code></pre>

<p>But my expected result should be <code>&lt;div class="test-class"&gt; 
   some texts
  &lt;/div&gt;.</code> please give me any idea.  </p>

<p>Thanks in advance. <strong><em>Edit @Js</em></strong></p>

<pre><code>&lt;html&gt; &lt;head&gt; 
  /* css &amp; js file attached */

&lt;script type="text/javascript"&gt;
       jQuery.fn.outerHTML = function(s) {
               return (s) ? this.before(s).remove() : 
               jQuery("&amp;lt;div&amp;gt;").append(this.eq(0).clone()).html();
                               }
   $(function() {
        var outerHTML = $('#parent').find('.test-class').outerHTML();
        alert(outerHTML);
            });
&lt;/script&gt;
&lt;/head&gt; &lt;body&gt;

/* the same html code as above */

&lt;/body&gt; &lt;/html&gt;
</code></pre>
