Refactoring addSidebarToggler()
This commit is contained in:
parent
9bc4bb02ee
commit
e95d15d584
@ -17,11 +17,7 @@ function addSidebarToggler() {
|
|||||||
$('#content').append('<span class="toggle-sidebar"></span>');
|
$('#content').append('<span class="toggle-sidebar"></span>');
|
||||||
$('.toggle-sidebar').bind('click', function(e) {
|
$('.toggle-sidebar').bind('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if ($('body').hasClass('collapse-sidebar')) {
|
$('body').toggleClass('collapse-sidebar');
|
||||||
$('body').removeClass('collapse-sidebar');
|
|
||||||
} else {
|
|
||||||
$('body').addClass('collapse-sidebar');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var sections = $('aside.sidebar > section');
|
var sections = $('aside.sidebar > section');
|
||||||
|
Loading…
Reference in New Issue
Block a user