BS2 Toggle Radio Btn
by TheOrdinaryGeek
HTML
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.4/css/bootstrap.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.4/css/bootstrap-responsive.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://rawgit.com/eu81273/jsfiddle-console/master/console.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.4/bootstrap.min.js"></script>
<script src="http://bootstrapdocs.com/v2.0.4/docs/assets/js/bootstrap-button.js"></script>
<link rel="stylesheet" href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap2-toggle.min.css">
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
<input type="checkbox" value='1' name="wallbox_needs_patched" id="wallbox_needs_patched">
JavaScript
$(function() {
$('#wallbox_needs_patched').bootstrapToggle({
on: 'Requested Text',
off: 'Activate',
onstyle: 'success'
});
})
$(function() {
$('#wallbox_needs_patched').change(function() {
console.log('Toggle: ' + $(this).prop('checked'))
})
})