Problem switching hidden value of an input
<p>I want to toggle the value of a hidden input, between <strong>advanced</strong> and <strong>normal</strong>?  But the below script doesn't work, nothing happens.</p>

<pre><code>$('#advancedLink').click(function () {
  $("#searchType").val($(this).text() == 'normal' ? 'advanced' : 'normal');
  return false;
});  
</code></pre>

<p>However, if I switch place of <strong>normal</strong> and <strong>advanced</strong> it will work one time, but it won't switch back to normal if I click again.  </p>

<pre><code>$('#advancedLink').click(function () {
  $("#searchType").val($(this).text() == 'normal' ? 'normal' : 'advanced');
  return false;
});  
</code></pre>

<p>But this last way seems rather unintuitive to me. Any ideas?  </p>

<p><strong>EDIT</strong><br>
This is the rendered HTML  </p>

<pre><code>&lt;div&gt;
    &lt;div class="left" id="searchControl"&gt;
        &lt;a id="advancedLink" href="#"&gt;Advanced search&lt;/a&gt;&lt;br&gt;
    &lt;/div&gt;
    &lt;input type="hidden" value="normal" name="searchType" id="searchType"&gt;
&lt;/div&gt;
</code></pre>
