Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
776 lars 1
var ComponentsBootstrapSwitch = function () {
2
 
3
    var handleBootstrapSwitch = function() {
4
 
5
        $('.switch-radio1').on('switch-change', function () {
6
            $('.switch-radio1').bootstrapSwitch('toggleRadioState');
7
        });
8
 
9
        // or
10
        $('.switch-radio1').on('switch-change', function () {
11
            $('.switch-radio1').bootstrapSwitch('toggleRadioStateAllowUncheck');
12
        });
13
 
14
        // or
15
        $('.switch-radio1').on('switch-change', function () {
16
            $('.switch-radio1').bootstrapSwitch('toggleRadioStateAllowUncheck', false);
17
        });
18
 
19
    }
20
 
21
    return {
22
        //main function to initiate the module
23
        init: function () {
24
            handleBootstrapSwitch();
25
        }
26
    };
27
 
28
}();
29
 
30
jQuery(document).ready(function() {
31
   ComponentsBootstrapSwitch.init();
32
});