Alister West

home is where your code is ...

JQuery - Prevent Select Change

Sometimes you may not want an option selectable.

<script>
    $(function(){
        var $status = $('select[name=Status]');
        var $last_selected_status = $status.find('option:selected');
        $status.change( function(e){
            if ( $(this).val() === 'resolved' ) {
                    $last_selected_status.attr('selected', true);
                    alert('Reverting your select change!');
            }
            $last_selected_status = $status.find('option:selected');
        });
    });
</script>
By Alister West