I want to write better jQuery code
<p>I'm relatively new to jQuery and I while I'm trying to learn, I have this worry that I'm doing things... well not wrong... but not necessarily the right way.</p>

<p>I have the script below which works fine and does what I need it to do. But looking at it, I'm not satisfied, is it really the best way of achieving my goal or am I being too picky?</p>

<p>Brief description of what I'm building: A search form containing dynamically generated field. Each field has 2 classes to specify whether or not it should appear in the quick and/or advanced search form. Two links to toggle between the two views.</p>

<pre><code>function searchModes() {
    $('p.quicksearch-true.advancedsearch-true').show();
    $('p.quicksearch-true.advancedsearch-false').show();
    $('p.quicksearch-false.advancedsearch-true').hide();
    $('p.quicksearch-false.advancedsearch-false').hide();
    $('#advanced').show();
    $('#quick').hide();

    $('#advanced').click(function () {
        $('p.quicksearch-true.advancedsearch-true').show();
        $('p.quicksearch-true.advancedsearch-false').hide();
        $('p.quicksearch-false.advancedsearch-true').show();
        $('#advanced').toggle();
        $('#quick').toggle();
        return false;
    });
    $('#quick').click(function () {
        $('p.quicksearch-true.advancedsearch-true').show();
        $('p.quicksearch-true.advancedsearch-false').show();
        $('p.quicksearch-false.advancedsearch-true').hide();
        $('#advanced').toggle();
        $('#quick').toggle();
        return false;
    });
}
</code></pre>

<p>The HTML is as follows:</p>

<pre><code>&lt;a href="#" id="quick"&gt;quick&lt;/a&gt;&lt;a href="#" id="advanced"&gt;advanced&lt;/a&gt;
&lt;p class="quicksearch-true advancedsearch-true"&gt;
  Some dynamically generated form field that appears in both quick and advanced search
&lt;/p&gt;
&lt;p class="quicksearch-true advancedsearch-false"&gt;
  Some dynamically generated form field that appears in quick search only
&lt;/p&gt;
&lt;p class="quicksearch-false advancedsearch-true"&gt;
  Some dynamically generated form field that appears in advanced search only
&lt;/p&gt;
&lt;p class="quicksearch-false advancedsearch-false"&gt;
  Should never occur, but if it did, it would remain hidden anyway
&lt;/p&gt;
</code></pre>

<p>So really, I'm after any feedback that you may have that could help me to try to write Better jQuery.</p>

<p>Much appreciated!</p>
