Updating a select option using jQuery
<p>I have a form where when something is updated, I need to change the name of that item in a select input.  I'm using this to loop through the options, but I'm having trouble figuring out how to change the text value.  Here is what I tried</p>

<pre><code>$('#GroupID option').each(function () {
                    if ($(this).val() == currently_editing_group_id)
                        $(this).attr('text', $('#NewGroupName').val());
                });
</code></pre>

<p>Here is the select input</p>

<pre><code>&lt;select id="PracticeGroupID" name="GroupID"&gt;
      &lt;option value="5"&gt;Test Group 1&lt;/option&gt;
      &lt;option value="6"&gt;Test Group 2&lt;/option&gt;
</code></pre>
