jquery to select the text from dynamically added select,options

by rajesh 2014-06-12 15:58:41

The following code can be used to select the text or value from a dynamically added select and options inside a div or span.

To select text

$("#id").find("select").find("option")[0].text;

To select value
$("#id").find("select").find("option")[0].val();

replace #id with the elements id

 
1222
like
0
dislike
0
mail
flag

You must LOGIN to add comments