I have a select which initially shows Select language until the user selects a language. When the user opens the select, I don\'t want it to show a
select
Op1:
$("#MySelectid option").each(function () { if ($(this).html() == "text to find") { $(this).attr("selected", "selected"); return; } });
Op2:
$('#MySelectid option') .filter(function() { return $.trim( $(this).text() ) == 'text to find'; }).attr('selected','selected');