title: If checkbox selected add class 'active'
body: <p>I find it easy to usually add a class active in jQuery but this time i am trying to implement it into a piece of code that is connected with google maps.</p>
  
  <p>My snippet code to show and hide markers using jQuery is this:</p>
  
  <pre><code>$('input[type="checkbox"]').click(function(){
          var id = $(this).attr('id');
          if($(this).is(':checked')) {
              show(id);
          } else {
              hide(id);
          }
        });
  </code></pre>
  
  <p>example of my input and labels </p>
  
  <pre><code>&lt;input type="checkbox" id="school" class="checkbox" /&gt;&lt;label for="school"&gt;Schools&lt;/label&gt;
  </code></pre>
  
  <p>What i want to do is if the checkbox is clicked, add a class to it AND display the marker.</p>
  
  <p>I have tried adding the AND operator in and using  <code>$(this).addClass('active');</code> to the code but no luck. Is this possible to implement in this code or will i have to create it from scratch again?</p>
  
  <p>Thanks. </p>