Some common and useful JS that I coudn't remember by heart
Drop down selection interaction
Retrieve selected value as and when the selection is change
<selectid="dd-id"><optiondata-code="apple"value="6">A For Apple</option><optiondata-code="banana"value="6">B For Banana</option></select>$("#dd-id").change(function () { console.log($(this).find('option:selected').data('code')); });