Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Ajax search pro mobile issue › Reply To: Ajax search pro mobile issue
April 16, 2020 at 1:08 pm
#26769
Keymaster
Hi,
Thanks for the details. Well, this is not exactly a plugin related issue, but the menu is programmed to close, when any of the items are clicked in it. It might be possible to bypass that via a custom code.
Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
add_filter( 'wp_footer', 'asp_try_fixing_menu_close' );
function asp_try_fixing_menu_close() {
?>
<script>
jQuery(function($){
$('.menu-item a').on('touchstart', (function(e){
if ( $(this).find('.promagnifier').length > 0 ) {
$(this).off();
}
}));
});
</script>
<?php
}
After that, reloading the page and clearing the cache should do the trick.