Question: I do have a form in which i have to country select box and two states select box.
in which when i click the first country the state of first country will be loaded. from there i can select the state. And i do have a check box on clicking that the same values that i have given in first country and state select box must be populated all state in the second state. 

This is how i done it,

```
var val = $('#state_name_bill option:selected').html();
        var value = $('#state_name_bill option:selected').val();
        $("#state_name_user_0").append("<option value=" + value + ">" + val + "</option>");
        $("#state_name_user_0").val(value);

```

Is there any alter, note in both the state select box selected state must not be deselected

Answer: 
Try like this,

```
var get_hmtl = $('#state_name_bill').html();  // get all option tag
var value = $('#state_name_bill option:selected').val(); // get selected value
$("#state_name_user_0").html(get_hmtl); // fill get_html
$("#state_name_user_0").val(value); // set selected value

```
you can try following.

var val = $("select option:selected").text();

for getting selected value and once you fill state list then

var obj = $("select").text(val);
obj.attr('selected', 'selected');