title: Bootstrap Checkbox always return on
body: <p>I am using bootstrap checkbox. the code for getting value and checkbox is bellow </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>    $( document ).ready(function() {
        
        var mycheckboxNewVal;
        
        var mycheckboxVal = $('#mycheckbox').val();
        
        if(mycheckboxVal == 'on')
          {
            mycheckboxNewVal==1;
          }
        else
          {
            mycheckboxNewVal==0;
          }
            
        alert("mycheckboxNewVal :"+mycheckboxNewVal);
  
         
        
      });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;div class="col-sm-1-5"&gt;&lt;label class="control-label" for="pwd"&gt;Check Box &lt;/label&gt;&lt;/div&gt;
        &lt;div class="col-sm-1"&gt;
          &lt;span class="button-checkbox"&gt;
        &lt;input type="checkbox" class="hidden" checked id="mycheckbox"/&gt;
        &lt;button type="button" class="btn-chk" data-color="success"&gt;&lt;/button&gt;
       &lt;/span&gt;
      &lt;/div&gt; </code></pre>
  </div>
  </div>
  </p>
  
  <p>When I do 'alert("mycheckboxNewVal :"+mycheckboxNewVal);' I always get value 1.</p>
  
  <p>Where am I making mistake?</p>