You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use layout-boxed much times it gives an error of jQuery, because the _fix function in $.AdminLTE.controlSidebar, delegate itself to the resize method of page when it's layout-boxed, so after some resizing it turn to like 2k calls of the same method.
So resolving it, you remove the delegate of resize to the activate part:
$.AdminLTE.controlSidebar = {
//instantiate the object
activate: function () {
//Get the object
var _this = this;
//Update options
var o = $.AdminLTE.options.controlSidebarOptions;
//Get the sidebar
var sidebar = $(o.selector);
//The toggle button
var btn = $(o.toggleBtnSelector);
//Listen to the click event
btn.on('click', function (e) {
e.preventDefault();
//If the sidebar is not open
if (!sidebar.hasClass('control-sidebar-open')
&& !$('body').hasClass('control-sidebar-open')) {
//Open the sidebar
_this.open(sidebar, o.slide);
} else {
_this.close(sidebar, o.slide);
}
});
//If the body has a boxed layout, fix the sidebar bg position
var bg = $(".control-sidebar-bg");
_this._fix(bg);
//If the body has a fixed layout, make the control sidebar fixed
if ($('body').hasClass('fixed')) {
_this._fixForFixed(sidebar);
} else {
//If the content height is less than the sidebar's height, force max height
if ($('.content-wrapper, .right-side').height() < sidebar.height()) {
_this._fixForContent(sidebar);
}
}
$(window).resize(function () {
_this._fix(sidebar);
});
},
.....................
_fix: function (sidebar) {
if ($("body").hasClass('layout-boxed')) {
sidebar.css('position', 'absolute');
sidebar.height($(".wrapper").height());
} else {
sidebar.css({
'position': 'fixed',
'height': 'auto'
});
}
}
............................
}
The text was updated successfully, but these errors were encountered:
Due to some neglect in my part, many issues weren't addressed for some time. Some of these issues are no longer relevant since a solution might have been found. Therefore, we decided to close all issues that are over a month old. However, if the issue still persists and you'd like help, then by all means repost your issue and we will consider it again. In the mean time, we will close this post.
Thanks for your understanding and we apologize for any inconvenience <3.
When you use layout-boxed much times it gives an error of jQuery, because the _fix function in $.AdminLTE.controlSidebar, delegate itself to the resize method of page when it's layout-boxed, so after some resizing it turn to like 2k calls of the same method.
So resolving it, you remove the delegate of resize to the activate part:
The text was updated successfully, but these errors were encountered: