diff --git a/opentech/static_src/src/javascript/main.js b/opentech/static_src/src/javascript/main.js index 07c9e2a8522c94f53393ec2d0af7f0b166977222..5f2ec688cf92763a143c9d3ff7cfdea59718c001 100755 --- a/opentech/static_src/src/javascript/main.js +++ b/opentech/static_src/src/javascript/main.js @@ -30,6 +30,13 @@ import MobileSearch from './components/mobile-search'; `); } }); + + // Show actions sidebar on mobile + $('.js-actions-toggle').click(function(e) { + e.preventDefault(); + this.classList.toggle('is-active'); + this.nextElementSibling.classList.toggle('is-visible'); + }); }); // Add active class to filters - dropdowns are dynamically appended to the dom, @@ -123,6 +130,8 @@ import MobileSearch from './components/mobile-search'; $('body').removeClass('no-scroll'); $('.js-filter-wrapper').removeClass('is-open'); $('.js-filter-list').removeClass('form__filters--mobile'); + $('.js-actions-toggle').removeClass('is-active'); + $('.js-actions-sidebar').removeClass('is-visible'); } }).trigger('resize'); })(jQuery);