how to get attribute value of selected option in jquery code example
Example 1: selected option attribute jquery
$('#location').find('option:selected').attr('myTag');
Example 2: jquery get data attribute of selected option
$(this).find(':selected').data('id')