remove elements javascript jquery
<p>Im trying to remove a row. But i can't figure it out really.
First of all I've got a button that'll add a new row, that works.
But I want to give the user the possibility to remove the just added row.
The row has an 'div' inside what acts as an deletebutton. But the deletebutton doesn't work?</p>

<p>I'm I missing something?</p>

<p>Greet,</p>

<p>Juki</p>

<pre><code>function addrow() {
$("#container").append("&lt;div id=\"row_added\"&gt;&lt;div class=\"deletebutton\" id=\"delbuttonnumber\"&gt;&lt;/div&gt;&lt;div id=\"addedcolor\" class=\"colorcube\"&gt;&lt;/div&gt;&lt;/div&gt;");
}

// deleterow the row
$(".deletebutton").click(function() {
    rowclrid = "#" + $(this).parent().attr("id");
    $(rowclrid).remove();
});
</code></pre>
