title: If checkbox is checked and user clicks on the button do this
body: <p>I have a checkbox with a button, i want when user check the check box and click on the button show an alert and when checkbox is unchecked and user clicks on the button do something else.</p>
  
  <p>I did something but i need help to accomplish it.
  Any help greatly appreciated</p>
  
  <pre><code>$(document).ready(function(e) {
      $('#remember').click(function() {
          if (this.checked) {
              alert("This is checked and you cliked");
          } else {
              alert("This is unchecked and you cliked");
          }
      });
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/3fd7cpqg/" rel="nofollow">JSFIDDLE</a></p>