title: Bootstrap switch button event
body: <p>I'm using bootstrap switch button. I want to change input value when on text or off text is changed. How can I check if on-text="Android" I want to print android to inp1 text or if off-text="IOS" I want to print ios to inp1 text. İs there another way to check text? You can check online demo <a href="http://jsfiddle.net/PNU45/156/" rel="noreferrer">http://jsfiddle.net/PNU45/156/</a></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>  &lt;input type="input" id="inp1" value=""&gt;
    &lt;input type="input" id="inp2" value=""&gt;
    &lt;input type="checkbox" checked="true" class="alert-status" id="btn1" data-size="normal" name="my-checkbox" data-on-text="Android" data-off-text="IOS"&gt;
    &lt;input type="checkbox" checked="true" class="alert-status" id="btn2" data-size="normal" name="my-checkbox" data-on-text="Java" data-off-text="C#"&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>$('.alert-status').bootstrapSwitch('state', true);
  $('#btn1').on('switchChange.bootstrapSwitch', function (event, state) {
      var x=$(this).data('on-text');
      var y=$(this).data('off-text');
      if(x=="Android"){
          $("#inp1").val("Android");
      }
      if(y=="IOS"){
          $("#inp1").val("IOS");
      }
  });
  $('#btn2').on('switchChange.bootstrapSwitch', function (event, state) {
      var x=$(this).data('on-text');
      var y=$(this).data('off-text');
      if(x=="Java"){
          $("#inp2").val("Java");
      }
      if(y=="IOS"){
          $("#inp2").val("IOS");
      }
  });
  </code></pre>