title: jquery selection with .not()
body: <p>I have some troubles with jQuery.
  I have a set of Divs with .square classes. Only one of them is supposed to have an .active class. This .active class may be activated/de-activated onClick.</p>
  
  <p>Here is my code :</p>
  
  <pre><code>    jQuery().ready(function() {
   $(".square").not(".active").click(function() {
    //initialize
    $('.square').removeClass('active');
  
    //activation
    $(this).addClass('active');
  
    // some action here...
   });
  
   $('.square.active').click(function() {
    $(this).removeClass('active');
   });
      });
  </code></pre>
  
  <p>My problem is that the first function si called, even if I click on an active .square, as if the selector was not working. In fact, this seems to be due to the addClass('active') line...</p>
  
  <p>Would you have an idea how to fix this ?
  Thanks</p>