Skip to content
Snippets Groups Projects
Commit 62d07c07 authored by Chris Lawton's avatar Chris Lawton Committed by Todd Dembrey
Browse files

adding logic to show/hide the actions panel on mobile

parent 425aecf7
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,13 @@ import MobileSearch from './components/mobile-search'; ...@@ -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, // Add active class to filters - dropdowns are dynamically appended to the dom,
...@@ -123,6 +130,8 @@ import MobileSearch from './components/mobile-search'; ...@@ -123,6 +130,8 @@ import MobileSearch from './components/mobile-search';
$('body').removeClass('no-scroll'); $('body').removeClass('no-scroll');
$('.js-filter-wrapper').removeClass('is-open'); $('.js-filter-wrapper').removeClass('is-open');
$('.js-filter-list').removeClass('form__filters--mobile'); $('.js-filter-list').removeClass('form__filters--mobile');
$('.js-actions-toggle').removeClass('is-active');
$('.js-actions-sidebar').removeClass('is-visible');
} }
}).trigger('resize'); }).trigger('resize');
})(jQuery); })(jQuery);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment