aboutsummaryrefslogtreecommitdiff
path: root/.themes/classic/source
diff options
context:
space:
mode:
authorParker Moore <parkrmoore@gmail.com>2014-06-15 21:46:08 -0400
committerParker Moore <parkrmoore@gmail.com>2014-06-15 21:46:08 -0400
commit695fe922a9c25d3f41fddccf9d2e4ba2fc02ef52 (patch)
tree7ec4bc92d8f9f7f73d4d12178ad3bc45ebcb6534 /.themes/classic/source
parent9bc4bb02ee3318d07b6b1ecd838a09461eff627b (diff)
parente95d15d584da26bad32cf56da78dad97c9fd57eb (diff)
downloadmy_new_personal_website-695fe922a9c25d3f41fddccf9d2e4ba2fc02ef52.tar.xz
my_new_personal_website-695fe922a9c25d3f41fddccf9d2e4ba2fc02ef52.zip
Merge pull request #1586 from simonewebdesign/master
Refactoring addSidebarToggler()
Diffstat (limited to '.themes/classic/source')
-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');