diff options
author | Gabriel Albo <gabriel@albo.com.br> | 2015-03-03 18:41:56 -0300 |
---|---|---|
committer | Gabriel Albo <gabriel@albo.com.br> | 2015-03-03 18:41:56 -0300 |
commit | a222f7ac7d05d9ab0ef8d9b809d01ebfc0f854bd (patch) | |
tree | e8612918986c18f40a120f750ae5e681cebc3af7 /web-ui/app/js | |
parent | 7075c0c441e92de7dafcc21fbedd825070bfccd6 (diff) |
Refactoring the tags visibility toggle function
Diffstat (limited to 'web-ui/app/js')
-rw-r--r-- | web-ui/app/js/foundation/off_canvas.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/web-ui/app/js/foundation/off_canvas.js b/web-ui/app/js/foundation/off_canvas.js index f5454062..a7a39bba 100644 --- a/web-ui/app/js/foundation/off_canvas.js +++ b/web-ui/app/js/foundation/off_canvas.js @@ -22,16 +22,16 @@ define(['flight/lib/component', 'page/events'], function (defineComponent, event this.closeSlider = function (ev){ ev.preventDefault(); $('.exit-off-canvas').click(); - if ($('#custom-tag-list').hasClass('expanded')) { - $('#custom-tag-list').removeClass('expanded'); - } else { - $('#custom-tag-list').addClass('expanded'); - } + this.toggleTagsVisibility(); }; this.toggleSlideContent = function (ev) { ev.preventDefault(); - $('.left-off-canvas-toggle').click(); + $('.left-off-canvas-toggle').click(); + this.toggleTagsVisibility(); + }; + + this.toggleTagsVisibility = function () { if ($('#custom-tag-list').hasClass('expanded')) { $('#custom-tag-list').removeClass('expanded'); } else { |