D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
home
/
shubmkcj
/
urbane.createerp.com
/
assets
/
js
/
Filename :
jquery.app.js
back
Copy
/** * Theme: Adminox Admin Template * Author: Coderthemes * Module/App: Main Js */ (function ($) { 'use strict'; function initSlimscrollMenu() { $('.slimscroll-menu').slimscroll({ height: 'auto', position: 'right', size: "5px", color: '#9ea5ab', wheelStep: 5 }); } function initSlimscroll() { $('.slimscroll').slimscroll({ height: 'auto', position: 'right', size: "5px", color: '#9ea5ab' }); } function initMetisMenu() { //metis menu $("#side-menu").metisMenu(); } function initLeftMenuCollapse() { // Left menu collapse $('.button-menu-mobile').on('click', function (event) { event.preventDefault(); $("body").toggleClass("enlarged"); }); } function initEnlarge() { if ($(window).width() < 1025) { $('body').addClass('enlarged'); } else { $('body').removeClass('enlarged'); } } function initActiveMenu() { // === following js will activate the menu in left side bar based on url ==== $("#sidebar-menu a").each(function () { if (this.href == window.location.href) { $(this).addClass("active"); $(this).parent().addClass("active"); // add active to li of the current link $(this).parent().parent().addClass("in"); $(this).parent().parent().prev().addClass("active"); // add active class to an anchor $(this).parent().parent().parent().addClass("active"); $(this).parent().parent().parent().parent().addClass("in"); // add active to li of the current link $(this).parent().parent().parent().parent().parent().addClass("active"); } }); } function init() { initSlimscrollMenu(); initSlimscroll(); initMetisMenu(); initLeftMenuCollapse(); initEnlarge(); initActiveMenu(); } init(); })(jQuery)