Select Not Getting Set To Selected Value Jquery
<p>I am trying to set a select to a specific option. I am creating my select with this code..</p>

<pre><code>$('#drpSortBy').append($("&lt;option&gt;&lt;/option&gt;").attr("value", 'Application_ID').text('Application'));
$('#drpSortBy').append($("&lt;option&gt;&lt;/option&gt;").attr("value", 'Approver_ID').text('Approver'));
$('#drpSortBy').append($("&lt;option&gt;&lt;/option&gt;").attr("value", 'Days_Pending').text('Days Pending'));
$('#drpSortBy').append($("&lt;option&gt;&lt;/option&gt;").attr("value", 'Originator_ID').text('Originator'));
$('#drpSortBy').append($("&lt;option&gt;&lt;/option&gt;").attr("value", 'Title').text('Title'));
</code></pre>

<p>I am trying to set the select list to a specific option based on value with this code but it doesnt seem to be responding</p>

<pre><code> $('#drpSortBy option').val(userSort.SortFieldName).attr('selected', true);
</code></pre>

<p>I have verified that userSort.SortFieldName='Originator_ID' for testing purposes</p>
