Q:

Show/hide select options using jquery

I have three identical selects.I want to remove or add the options in each based on what is chosen already so that you can only choose what is left.What I tried
<div id="myselects">
<select class="e1" style="width:300px">
        <option></option>
        <option >Alabama</option>
        <option >Amalapuram</option>
        <option >Anakapalli</option>
       </select>

<select class="e1" style="width:300px">
        <option></option>
        <option >Alabama</option>
        <option >Amalapuram</option>
        <option >Anakapalli</option>
       </select>

<select class="e1" style="width:300px">
        <option></option>
        <option >Alabama</option>
        <option >Amalapuram</option>
        <option >Anakapalli</option>
       </select>
</div>

script   
$('.e1').change(function(){
 var value=$(this).find('option:selected').val();

 $('#myselects').find('option[value="'+ value +'"]:not(:selected)').attr('disabled','disabled');

});

A:

Since you have no value attribute on your options this won't work. When you get the .val() of the first select it will return the "computed" value which is either the selected option's value attribute OR the "text" value of the option (which is what you will get)... however when you try to filter the other options by their value attribute... they will all be empty.
However this should work as it compares the text() vs. the val():
$('.e1').change(function(){
    var value = $(this).find('option:selected').text();
    if(value != ''){
        $('#myselects').find('option:not(:selected)').each(function(){
            if($(this).text() == value){
                //uncomment if you want to disable
                //$(this).attr('disabled','disabled');

                //remove this option
                $(this).remove();
            }
        });
    }
});

You can try it out in this JSFiddle

