I use the bootstrap select plugin ( http://silviomoreto.imtqy.com/ ) and I handle the change event "changed.bs.select" to capture any selection changes. According to the documentation at https://silviomoreto.imtqy.com/bootstrap-select/options/ , this event fires after the selection value changes. It goes through the event, clickedIndex, newValue, oldValue.
I would like to understand what exactly newValue and oldValue represent. Because this is always the case when the new value is true and oldValue is false.
Here is a script illustrating my point.
https://jsfiddle.net/muojdbh9/
HTML
<select class="selectpicker">
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
</select>
<div class="res">
Waiting for a change event
</div>
JQuery
$(".selectpicker").on('changed.bs.select', function (event, clickedIndex, newValue, oldValue) {
$("div.res").html("newValue: " + newValue + "<BR>oldValue: " + oldValue);
});