How to remove div element with jQuery
<p>when I want to remove div element, I have the following code:</p>

<pre><code>&lt;div class='text-field'&gt;
     &lt;input type='text' /&gt;
     &lt;input type='button' class='remove-btn' /&gt;
&lt;/div&gt;
&lt;div class='text-field'&gt;
     &lt;input type='text' /&gt;
     &lt;input type='button' class='remove-btn' /&gt;
&lt;/div&gt;
&lt;div class='text-field'&gt;
     &lt;input type='text' /&gt;
     &lt;input type='button' class='remove-btn' /&gt;
&lt;/div&gt;
&lt;div class='text-field'&gt;
     &lt;input type='text' /&gt;
     &lt;input type='button' class='remove-btn' /&gt;
&lt;/div&gt;
</code></pre>

<p>when i click remove-btn, its parent div text-field should be removed. i have this code but it doesnt work.</p>

<pre><code>$(".remove-btn").click(function(){
    $(this).parent().remove();
});
</code></pre>

<p>thanks for any help. :)</p>
