aboutsummaryrefslogtreecommitdiff
path: root/.themes/classic
diff options
context:
space:
mode:
authorSimone <hello@simonewebdesign.it>2014-06-15 21:51:15 +0100
committerSimone <hello@simonewebdesign.it>2014-06-15 21:51:15 +0100
commite95d15d584da26bad32cf56da78dad97c9fd57eb (patch)
tree7ec4bc92d8f9f7f73d4d12178ad3bc45ebcb6534 /.themes/classic
parent9bc4bb02ee3318d07b6b1ecd838a09461eff627b (diff)
downloadmy_new_personal_website-e95d15d584da26bad32cf56da78dad97c9fd57eb.tar.xz
my_new_personal_website-e95d15d584da26bad32cf56da78dad97c9fd57eb.zip
Refactoring addSidebarToggler()
Diffstat (limited to '.themes/classic')
-rw-r--r--.themes/classic/source/javascripts/octopress.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/.themes/classic/source/javascripts/octopress.js b/.themes/classic/source/javascripts/octopress.js
index 218a0a1a..faaf3dbe 100644
--- a/.themes/classic/source/javascripts/octopress.js
+++ b/.themes/classic/source/javascripts/octopress.js
@@ -17,11 +17,7 @@ function addSidebarToggler() {
$('#content').append('<span class="toggle-sidebar"></span>');
$('.toggle-sidebar').bind('click', function(e) {
e.preventDefault();
- if ($('body').hasClass('collapse-sidebar')) {
- $('body').removeClass('collapse-sidebar');
- } else {
- $('body').addClass('collapse-sidebar');
- }
+ $('body').toggleClass('collapse-sidebar');
});
}
var sections = $('aside.sidebar > section');