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

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45339
    Tomkaragounis
    Tomkaragounis
    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 Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #45348
    Tomkaragounis
    Tomkaragounis
    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 Marcinko
    Ernest Marcinko
    Keymaster

    You are very welcome 🙂

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

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #45351
    Tomkaragounis
    Tomkaragounis
    Participant

    Thats alright Ernest

    Thanks again for the help today, I appreciate it.

    Have an awesome day!
    Cheers,
    Tom

    #45352
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    You are very welcome!

    I will close this topic soon.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.