jquery add/remove with greyout option
<p>How can I undo the grey-out if the select row was removed? Also, when there are several rows added, I want to remove only the row corresponding to that "Remove" button and not the others. I guess, my main concern is how can I know which added row has been removed, when  the "remove" button is clicked. Please help. Many thanks in advance.</p>

<pre><code>$('#btn').live('click',function() {
   $("#table_name tr:first").before("&lt;tr&gt;&lt;td class='c'&gt;&lt;input type='hidden' name='a_name' value='" + a + "'&gt;" + a + "&lt;/td&gt;&lt;input type='button' class='delete' value='Remove'&gt;&lt;/td&gt;&lt;/tr&gt;");
   $("#a option:selected").attr("disabled", true);
});
$('#table_name td .delete').live('click',function(){
   // here I want to once again enable the selection
   attr("disabled", false);
   $(this).parent().parent().remove();
});
&lt;select id="a" name="a"&gt;
   &lt;option value="1"&gt;1&lt;/option&gt;
   &lt;option value="2"&gt;2&lt;/option&gt;
   &lt;option value="3"&gt;3&lt;/option&gt;
   &lt;option value="4"&gt;4&lt;/option&gt;
&lt;/select&gt;
&lt;input id="btn" class="button" type="button" value="Add" /&gt;
</code></pre>
