Show/hide switch when i click on a link
===

the problem was, that i have created a ASC/DESC filter, but i will that only one Filter is displayd, and when i clicked on the link, the other (DESC) is displayd and the other is hide and reserved. 

Here is the code for the Filter:


  

     <form id="sort-direction" class="sort-control hidden" method="get" action="">
    <div style="margin:0;padding:0;display:none">
    <input type="hidden" value="" name="utf8">
    </div>
    <button id="sort-direction" class="post-link" type="submit">Sort Ascending</button>
    <input id="order" type="hidden" value="asc" name="order">
    
    </form>
    <a class="sort-control  sort-direction-asc" href="?utf8=&order=asc#" data-original-title="Sort Ascending">Sort Ascending</a>
    
    
    
    <form id="sort-direction" class="sort-control hidden" method="get" action="#">
    <div style="margin:0;padding:0;display:none">
    <input type="hidden" value="#" name="utf8">
    </div>
    <button id="sort-direction" class="post-link" type="submit">Sort Descending</button>
    <input id="order" type="hidden" value="desc" name="order">
    </form>
    <a class="sort-control sort-direction-desc" href="?utf8=&order=desc#" data-original-title="Sort Descending">Sort Descending</a>

![enter image description here][1]

And this should be the Java code, which only one element is displayed and then click on it and the other is displayed .... But it does not work.

      $(".sort_select").change(function () { this.form.submit(); });
    
    $("#sort-direction").displayButtonAsLink({ 
     "class": "sort-control sort-direction-asc",
     "title": "Sort Ascending"
     });
     $(".sort-direction-asc").twipsy({ placement: "below" });
    
      $(".sort_select").change(function () { this.form.submit(); });
    
    $("#sort-direction").displayButtonAsLink({ 
     "class": "sort-control sort-direction-desc",
     "title": "Sort Descending"
     });
     $(".sort-direction-desc").twipsy({ placement: "below" });

  [1]: http://i.stack.imgur.com/6y88N.png