diff options
author | Parker Moore <parkrmoore@gmail.com> | 2014-06-15 21:46:08 -0400 |
---|---|---|
committer | Parker Moore <parkrmoore@gmail.com> | 2014-06-15 21:46:08 -0400 |
commit | 695fe922a9c25d3f41fddccf9d2e4ba2fc02ef52 (patch) | |
tree | 7ec4bc92d8f9f7f73d4d12178ad3bc45ebcb6534 /.themes | |
parent | 9bc4bb02ee3318d07b6b1ecd838a09461eff627b (diff) | |
parent | e95d15d584da26bad32cf56da78dad97c9fd57eb (diff) | |
download | my_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')
-rw-r--r-- | .themes/classic/source/javascripts/octopress.js | 6 |
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'); |