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

Force results div to close, after click

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Force results div to close, after click

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45339
    TomkaragounisTomkaragounis
    Participant

    Helllooo Team!

    I have SPA enviroment along with WP.
    We have set it up (with your help) and now its working within SPA.

    What I am trying to do, but cant, is to force the results div to close when I press a result link.

    I tried to replace asp_an_fadeInDrop with asp_an_fadeOutDrop when the click is pressed, but unable to do.

    Can you please take a look?

    Thank you,
    Tom

    #45346
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Tom,

    I recalled someone else asked for a similar behavior, I recommended this custom code then:

    add_action('wp_footer', 'asp_add_footer_script', 99999);
    function asp_add_footer_script() {
    	?>
    	<script>
    	jQuery(function($){
    		jQuery('body').on('click', '.asp_r .item', function(){ 
    			ASP.api(1, 'closeResults'); 
    		});
    	});
    	</script>
    	<?php
    }

    This should do the trick.

    #45348
    TomkaragounisTomkaragounis
    Participant

    Hello Ernest,

    Once again, life saver.

    Thank you, Ernest!

    (can I ask if you do custom work? And what is your hourly rate?)

    Thanks,
    Have a great day!
    Tom

    #45349
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are very welcome 🙂

    I am not available for custom work unfortunately, I am sorry.

    #45351
    TomkaragounisTomkaragounis
    Participant

    Thats alright Ernest

    Thanks again for the help today, I appreciate it.

    Have an awesome day!
    Cheers,
    Tom

    #45352
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are very welcome!

    I will close this topic soon.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.