Kishore Kumar Kishore Kumar - 2 months ago 5
jQuery Question

How to get the specific option value of a dropdown by passing the option text in jquery

I am using the below line to get the value of a specific option of a dropdown, it is working in IE, but not working in Chrome.

$("#idDescription option[text='Business']").val();

Answer

Please try this:

$("#idDescription").find("option:contains('Business')").val();