myvideogamelist.com/resources/assets/demo1/js/layout/aside.js
Jimmy Brancaccio b39ecf1638 Initial Commit
The initial public commit of MVGL website code.
2024-01-14 13:51:43 -06:00

42 lines
No EOL
964 B
JavaScript
Vendored

"use strict";
// Class definition
var KTLayoutAside = function () {
// Private variables
var toggle;
var aside;
// Private functions
var handleToggle = function () {
var toggleObj = KTToggle.getInstance(toggle);
// Add a class to prevent aside hover effect after toggle click
toggleObj.on('kt.toggle.change', function() {
aside.classList.add('animating');
setTimeout(function() {
aside.classList.remove('animating');
}, 300);
})
}
// Public methods
return {
init: function () {
// Elements
aside = document.querySelector('#kt_aside');
toggle = document.querySelector('#kt_aside_toggle');
if (!aside || !toggle) {
return;
}
handleToggle();
}
};
}();
// On document ready
KTUtil.onDOMContentLoaded(function () {
KTLayoutAside.init();
});