views:

62

answers:

3

$('#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() ?

+8  A: 

$() can take two arguments:

$(selector, context)

so it may be possible to use

$(':selected', this).text();
Emyr
+4  A: 

You can use either

$(':selected', this).text();

or

$(this).find(':selected').text();
Greg
+2  A: 

Or you can also do something like this:

$(this).find(":selected").text();

jerjer