Jquery - Javascript DHTML - Developer Resourses - jquery dropdowns get option text based on value ::: Lionfish Tehcnologies

Home / Developers Resourses / Tips

Jquery dropdowns get option text based on option value

Mostly common used with dropdown with multiple selection. If we already know the value of the element and we want to get the text of that specific option this is the code

// It is not the prettier solution but it's works
var v = selectedValue;
$("#DropDownId option[value='" + v +"']").text();

Lionfish Technologies ® 2009 All rights reserved