$('#selectList :selected').text()
is known syntax
i have to fetch the value for the same from $(this)
instead of $('#selected')
something like this
$(this :selected').text()
?
$('#selectList :selected').text()
is known syntax
i have to fetch the value for the same from $(this)
instead of $('#selected')
something like this
$(this :selected').text()
?
$() can take two arguments:
$(selector, context)
so it may be possible to use
$(':selected', this).text();
You can use either
$(':selected', this).text();
or
$(this).find(':selected').text();
Or you can also do something like this:
$(this).find(":selected").text();