how to call function in select option code example
Example: javascript prevent value change in select option
old_value = $('#select :selected').val();
$('#select').change(function() {
if($(this).val() == 'option 3') {//your specific condition
$('#select').val(old_value);
} else {
old_value = $('#select :selected').val();
}
});