title: Jquery toggleclass not working, following the example nearly word for word
body: <p>I'm fairly new to Jquery, hence the noob questions......</p>
  
  <p>Iv been trying to follow this to toggle a class on and off when a user clicks a link, iv got it now so that if the user clicks a link with lets say id="22" it will tick the tickbox with id="tick_22", what I'm trying to do now is add some user feedback so that the link changes colour when the tick box is ticked. I have tried to follow the example on the Jquery site <a href="http://api.jquery.com/toggleClass/" rel="nofollow">http://api.jquery.com/toggleClass/</a>
  , but for some reason its not working ?. I'm not sure if I need to use (this.class) or just (this) ?.</p>
  
  <pre><code>    $(document).on('click', '.selectlink', function () {
           var myId = $('#check_' + this.id);
           if ($(myId).is(':checked')) {
           $(myId).prop('checked', false);
           $(this).toggleclass( activeselectlink, addOrRemove );
           }
           else {$(myId).prop('checked', true);
           $(this).toggleclass( activeselectlink, addOrRemove );
           }
           countChecked();
      });
      });
      &lt;/script&gt;
  </code></pre>