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

Refreshing Live Search Results not working when Clicking "X"

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Refreshing Live Search Results not working when Clicking "X"

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32011
    mckots87mckots87
    Participant

    Hi,

    Im currently using Live Search Results with my own custom loop template created in Elementor.

    When I search for a phrase and the “X” button shows up in the input field, once clicking it, the Live results do not refresh.

    If I delete using the backspace on the keyboard though, it refreshes.

    Is there any fix for this or recommendations? Thank you so much again for all the help.

    The search page is here if you need it: http://stagechicomm.wpengine.com/attorney-listings/

    Mike

    #32023
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    It is kind of intentional (so it only clears the prhase), as it is not completely possible to reset the elementor widget state to it’s original form. There is however a custom code I can suggest, that will trigger an empty search when clicking the close button.

    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
    }
    #32035
    mckots87mckots87
    Participant

    You cannot access this content.

    #32039
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are welcome 🙂

    If you don’t mind, I close this ticket and mark it as resolved. Feel free to open another one, if you have any questions.

    If you haven’t already, feel free to rate our plugin on your codecanyon downloads page, or on the plugin page. It is greatly appreciated!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Refreshing Live Search Results not working when Clicking "X"’ is closed to new replies.