How can I click a checkbox and know if checked or not checked? : <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>$('.p_check').click(function() {
          if ($(this).is(':checked')) {
              alert("checked");
          } else {
               alert("unchecked");
          }
       });</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;div class='checkbox p_check'&gt;&lt;label&gt;&lt;input type='checkbox'&gt;New Password&lt;/label&gt;&lt;/div&gt;</code></pre>
</div>
</div>
</p>

<p>My alert is always "unchecked", no matter if I check or uncheck it</p>
