Home › Forums › Themes Support › Claue › Close filter menu on mobile site
- This topic has 3 replies, 2 voices, and was last updated 3 years, 6 months ago by Harry.
-
AuthorPosts
-
-
October 8, 2020 at 7:44 pm #38779Many17Support Expired
Hi!
It would be very convenient and useful to be able to close the filter sidebar of the shop by clicking outside the menu without having to “scroll” to find the closing “X”. Filters are often very long and users don’t always understand that they have to go back up. I changed line 708 of the theme.js file in the child theme as you suggested but unfortunately it doesn’t work. How can I do?
Thanks
-
October 8, 2020 at 8:08 pm #38780HarrySupport Expired
Hi Many,
Please download attach file and put in claue-child
1. result-count.php in claue-child > woocommerce > loop
2. archive-product.php in claue-child > woocommerce and add below code to claue-child > functions.php
add_action( 'wp_footer', 'filter_close_button_script' ); function filter_close_button_script() { ?> <script> (function( $ ) { "use strict"; var wcInitChildSidebarFilter = function() { $( 'body' ).on( 'click', '.filter-button', function(e) { $( '.jas-filter-content' ).toggleClass( 'opened' ); $( '.jas-container' ).on( 'click', function() { $( '.jas-filter-content' ).removeClass( 'opened' ); }); e.preventDefault(); }); } $( document ).ready( function() { wcInitChildSidebarFilter(); }); })( jQuery ); </script> <?php }
Btw, your support expired. Please renew you support at https://themeforest.net/item/claue-clean-minimal-woocommerce-theme/18929281 that will help us continue develop new features and improve our theme.
Thank and best regards!
Attachments:
You must be logged in to view attached files.Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
October 9, 2020 at 8:03 pm #38795Many17Support Expired
Great! Thank you very much, next week I will buy the Gecko theme because you are always the creators and your support is the top!
-
October 9, 2020 at 9:25 pm #38799HarrySupport Expired
Thank you for your kind words! Please buy Gecko theme soon before sale ending.
Have a nice weekend!
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio
-
-
AuthorPosts
You must be logged in to reply to this topic.