Hiding mobile nav menu for certain Shopify theme
This is an example of the MJS API code that you need to put in the <head>
section of your store in order to hide the navigation menu on mobile when doing search
(function($) {
window.findifyApiRegistry = window.findifyApiRegistry || [];
window.findifyApiRegistry.push({
hook: "search.results",
mapProps: function(apiData) {
if(apiData.isMobile) {
$("html").removeClass("show-nav");
}
}
});
}(jQuery));
Updated almost 5 years ago