Admin JS Code Structure

This section will give you a brief description of our admin structure JS code.

1. app.js : This is primary js file. It is necessary for the layout to work. It contains the code as follows :-

a. Built-in variables

b. Sidebar scroll functionality

c. Sidebar and Control Sidebar Toggle

d. Desktop and Mobile Resolution Functions

var App = function() {
    
    ...........
    
    ...........

    ...........

    return {
        init: function() {

            ...........

            ...........

            ...........

        },
    }

}();

2. custom.js : This is custom js file. This secondary file is necessary for layout and widget functionality. It contains the code as follows :-

a. Scroll To Top

b. Control Sidebar Scroll Script

c. Multi-Check checkbox

And many more...

/*
=========================================
|                                       |
|           Scroll To Top               |
|                                       |
=========================================
*/ 
$('.scrollTop').click(function() {
    $("html, body").animate({scrollTop: 0});
});


    ...........

    ...........

    ...........


// Close the dropdown menu if the user clicks outside of it

window.onclick = function(event) {

    ...........

    ...........

    ...........

}