get the selected item in javascript code example
Example 1: get text selected option jquery
$('#id option:selected').text()
Example 2: get selected element html jquery
$('.classSelector')[0].outerHTML
$('#id option:selected').text()
$('.classSelector')[0].outerHTML