drop-down clone add and remove using jquery
<p>Im trying create search filter based on drop down using clone method, below i have place the code can any one plz help me fixing the problem.i have create 3 filter search - search1,search2,search3.
by default one filter search will be available in that we have 3 options value1,valu2,value3 where value1 will be disabled since its selected option and other 2 options value will be there as enabled so that we
can change the selected options</p>

<p>add more
 on click of add more filter i have to display other options which are enable/available  in the previous drop down i,e if i have selected value1 in my first search , on click of add more filter , i should display search2 with value1 as
disabled and value2 as disabled</p>

<p>close select function
i have 3 search with all options which are disabled now if i click close select in search 2 its should hide/remove the search2 filter and add more filter should be appear
and option should be enable on other searches  so that i can change the options in the other searches</p>

<pre><code> &lt;html&gt;
        &lt;head&gt;
    &lt;body &gt;
        &lt;form name="search" method="post" action="sample1.php"&gt;
                &lt;div class="js-selectblock"&gt;
                    &lt;div class="js-select"&gt;
                        &lt;select name="select2[]" class="mySelect" &gt;
                            &lt;option value="1" selected="selected" &gt; Search1&lt;/option&gt;
                            &lt;option value="2" &gt;Search2&lt;/option&gt;
                            &lt;option value="3" &gt;Search3&lt;/option&gt;

                        &lt;/select&gt; 
                        &lt;span  class="close select"&gt;X&lt;/span&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
                    &lt;input type="submit" value="submit"&gt;
                &lt;div id="add more"&gt;
                    Add another filter
                &lt;/div&gt;
                &lt;/form&gt;
                &lt;script type='text/java script' src='http://code.jquery.com/jquery-1.7.1.js'&gt;&lt;/script&gt;
                &lt;script type='text/java script'&gt;//&lt;![C DATA[ 
                    $(function(){
                      $('#add more')click(function(){     

                            if($('.close select').length &lt; $('.js-select:first option').length )
                            {
                                $('.js-selectblock &gt; .js-select:first').clone().appendTo('.js-selectblock');   
                                $('.mySelect:last option').removeAttr('selected').filter(':not(:disabled):first').attr('selected','selected');


                                var mySelect = $('.mySelect');

                                $('.mySelect option:selected').each(function(){
                                    //alert(mySelect.find('option[value="'+$(this).val()+'"]'));
                                  //  mySelect.find('option[value="'+$(this).val()+'"]').attr('disabled','disabled');        
                                  mySelect.find ('option[value=' + $(this).val() + ']').attr('disabled', true);
                                });

                            }
                            if($('.closeselect').length &gt;= $('.js-select:first option').length )
                            {
                                $('#addmore').hide();
                            }
                        });

                        $('.closeselect').live('click',function(){
                            if($('.closeselect').length &gt;1)
                            {
                                $(this).parent().remove(); 
                                var SelectedValue = $(this).parent().children('select').val();
                                $('.js-selectblock option[value="'+SelectedValue+'"]').removeAttr('disabled');
                                $('#addmore').show();
                            }                   
                        });    
                    });
                &lt;/script&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>
