Need some help with toggleClass

Need some help with toggleClass

I'm very new to jquery, and I appreciate any input. I'm trying to get over my fear and distrust of all things javascript!

I'm updating some documentation in a Rails app. I have a sidebar with navigation links. Each link connects to an anchor in the documentation.

I'm trying to use toggleClass to change the styling on the sidebar links when they are clicked, without changing all of the links in the sidebar and without changing the styling of links in the documentation.

:javascript
  $(document).ready(function(){
    $("ul.menu a").click(function(){
      $("a").toggleClass("selected");
    });
  });

And the CSS from my stylesheet, using sass:

.selected
  color: orange

The way I want this to work is for each link to be white until clicked on, and then orange once clicked. If a user clicks onto another link, the previous link toggles back to white and the new link changes to orange, and so on. 

Right now, if I click on a link, all links toggle to orange. If I click on another, all links toggle to white. Is toggleClass the wrong thing to use here, or have I implemented it incorrectly? I appreciate any help. Thanks!