title: Trigger checkbox change class in Jquery
body: <p>I am new to jQuery. 
  I am trying to make a switcher using a checkbox. At the moment I have gone this far</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function() {
    $('input.cbx').on('change', function() {
      if ($(this).prop("checked", true)) {
        $('body').addClass('dark');
      } else if ($(this).prop("checked", false)) {
        $('.body').addClass('light');
      }
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;input id="dn" type="checkbox" class="cbx hidden" /&gt;
  &lt;label for="dn" class="lbl"&gt;&lt;/label&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>As you can see the checkbox stay checked after the first click, I imagine is a noob situation but, can you help me please?</p>