jQuery - remove select option :selected attribute on click
<p>I'm working on a multiselect that pops up in a modal dialog.  When the dialog closes, I'm populating a <code>&lt;ul&gt;</code> with <code>&lt;li&gt;</code>'s that contain text from the <code>:selected</code> options.  When each individual <code>&lt;li&gt;</code> is clicked, I want the <code>&lt;li&gt;</code> to fade away and the corresponding <code>:selected</code> <code>&lt;option&gt;</code> to become unselected.  I have everything working except unselecting the <code>&lt;option&gt;</code>.</p>

<p>Here's my code:</p>

<pre><code>$('.control-finished').click(function(){
            $('ul.multiselect-dropdown-options-'+name+'').empty();
            $('option:selected', select).each(function(index, value) {
                var livalue = $(this).attr('value');
                $('ul.multiselect-dropdown-options-'+name+'').append('&lt;li class="dropdown-option '+livalue+'"&gt;'+$(value).text()+'&lt;!-- &lt;a class="remove-option '+livalue+'"&gt; --&gt;x&lt;/li&gt;');
                $('li.dropdown-option').click(function(){
                    $(this).fadeOut(500, function() { $(this).remove(); });
                    $('option:selected', this).removeAttr('selected');
                });
            });         

        });
</code></pre>

<p>Any help is greatly appreciated!</p>
