This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Trouble resetting the search

#31995
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

That button is only to clear the search phrase from the input field. However I might be able to suggest 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_action('wp_footer', 'asp_trigger_search_on_close');
function asp_trigger_search_on_close() {
	?>
	<script>
	jQuery(function($){
		$('.proclose svg').on('click touchend', function(e){ 
			var $e = $(this).closest('.asp_w');
			setTimeout(function(){
				ASP.api($e.data('id'), $e.data('instance'), 'searchFor');
			}, 250);
		});
	});
	</script>
	<?php
}