title: Add class to a class and anchor tag
body: <p>I want to add a class to an anchor tag using jQuery. The anchor tag is inside a list item with the class nav-1. I tried the following with no luck.</p>
  
  <pre><code>$( ".nav-1 a" ).addClass( "pink" );
  </code></pre>
  
  <p>Anyone know what I am doing wrong?</p>
  
  <p>As far as I can see there in no error for this in the Script tab on Firebug. There is no class of pink being added. The JS file is in the head so maybe this is problem. I will test and post my results.</p>
  
  <p>The page can be found here: <a href="http://cqwebdesign.co.uk/partybits2008.co.uk" rel="nofollow">http://cqwebdesign.co.uk/partybits2008.co.uk</a></p>
  
  <p>I added the jQuery code the the script.js file its the last load external JS file in the head, and I added the following code just before the closing body tag:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $( ".nav-1 a" ).addClass( "pink" );
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Still no luck with the class being added.</p>
  
  <p>I believe it might be the way jQuery is included in the software. It uses Prototype but the framework I'm using integrates jQuery and adds noconflict feature I think.</p>