Setting Dropdownlist Selected Value by Text based on Text / Value using jQuery.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 169
Set Dropdownlist Selected Value by Text 
$('#btnsettext').click(function()
{
var selectedText = 'Vishal';
$('#ddlprojects option').map(function()
{
if($(this).text() == selectedText) return this;
}).attr('selected','selected');
})

Comments or Responses

Login to post response