0

I am using jquery chosen on a select box. Then I am cloning this to display same select box in other div. Here I am just cloning the select box and not the entire div because if i clone whole div it will clone the html added by chosen(). Now I want to get the selected option in last select box which I have cloned.

<select class="chosen-select" id="critaria-1" data-placeholder="Choose ...">
<option value="text">Text</option>
                        <option value="Department">Department</option>
                        <option value="Country">Country</option>
                        <option value="State">State</option>
                        <option value="Industry">Industry</option>
                        <option value="Sub-Industry">Sub-Industry</option>
                        <option value="Revenue">Revenue</option>
                        <option value="Title">Title</option>
                        <option value="Employees">Number of employees</option>
                        <option value="News">News</option>
                        <option value="Intrests">Intrests</option>
                        <option value="Interaction">Social Interaction</option>
                    </select>

JS code :

var clone_search = $('.chosen-select').last().clone(); 
        clone_search.prop('id','critaria-' + id); // add a new id 
        clone_search.find('option:selected').remove(); // remove the last selected

Actually I dont want to repeat the selected option from parent in the cloned select box

j0k
  • 22,600
  • 28
  • 79
  • 90
Umar Adil
  • 5,128
  • 6
  • 29
  • 47
  • http://stackoverflow.com/questions/10521315/chosen-jquery-plugin-getting-selected-values $("#select-id").chosen().val() – Umar Adil Oct 09 '13 at 13:57

1 Answers1

0
$("#select-id").chosen().val() 
Umar Adil
  • 5,128
  • 6
  • 29
  • 47