Trying to implement a custom select dropdown using select2 plugin
Is it possible to have the selected value to display only the actual option \'value\' instead of the text,
$('select').select2({
width: 300
}).change(function () {
$('a.select2-choice span').text($(this).val());
// change select2 span to the selected value
}).trigger('change');
// trigger change the first time so the displayed text will change to value