title: meteor retrieve true/false value from checkbox switchChange
body: <p>I have an event handler attached to checkboxes. I am using bootstrap switch <a href="http://www.bootstrap-switch.org/" rel="noreferrer">http://www.bootstrap-switch.org/</a></p>
  
  <p>I am trying to get the state value which is either true or false into a variable so I can set it to the session value.</p>
  
  <p>I can get the true or false value when the state changes (as seen in the rendered code). However, I would like to get this value within events. Please check my x variable. </p>
  
  <p>client.js</p>
  
  <pre><code>Template.myTemplate.rendered = function () {
   $('input[name="questions"]').bootstrapSwitch('state', true, true);
   $('input[name="questions"]').on('switchChange.bootstrapSwitch', function(event, state) {
   console.log(state); // true | false
  });
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>&lt;template name="myTemplate"&gt;
   &lt;div class="row"&gt;
    &lt;input type="checkbox"  name="questions" unchecked&gt; Hobby?
   &lt;/div&gt;
   &lt;div class="row"&gt;
    &lt;input type="checkbox" name="questions" unchecked&gt; Writer?
   &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am trying to get the value which is printed out in <code>console.log(state)</code> within the rendered code into a variable within my event so I can set the session to value to either true or false.</p>
  
  <pre><code>Template.myTemplate.events({
  'click input': function(event) {
    var x = $(this).is(":checked").val();
    Session.set("statevalue", x);
    console.log(Session.get("statevalue")); // this is not printing out anything
   }
  });
  </code></pre>