HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/www/public_html/assets-front/adminlatest/build/js/on-off-switch-onload.js
if (!DG)var DG = {};

DG.OnOffSwitchAuto = function (config) {

    var properties = DG.OnOffSwitchProperties;

    $( document ).ready(function() {
        if(config.cls){
            var els = $(config.cls);
            var index = 0;
            for(var i=0,len=els.length;i<len;i++){
                var elementConfig = jQuery.extend({}, config);
                var el = $(els[i]);
                if(!els[i].id){
                    els[i].id = "dg-switch-" + index;
                    index++;
                }
                elementConfig.el = "#" + els[i].id

                for(var j=0;j<properties.length;j++){
                    var attr = "data-"+ properties[j];
                    var val = el.attr(attr);
                    if(val){
                        elementConfig[properties[j]] = val;
                    }
                }

                new DG.OnOffSwitch(
                    elementConfig
                );
            }
        }
    });


};