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 has 5 replies, 2 voices, and was last updated 2 years, 8 months ago by Ernest Marcinko. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts September 11, 2023 at 12:55 pm #45339 TomkaragounisParticipant 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 September 11, 2023 at 2:40 pm #45346 Ernest MarcinkoKeymaster 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. September 11, 2023 at 2:55 pm #45348 TomkaragounisParticipant 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 September 11, 2023 at 3:19 pm #45349 Ernest MarcinkoKeymaster You are very welcome 🙂 I am not available for custom work unfortunately, I am sorry. September 11, 2023 at 3:22 pm #45351 TomkaragounisParticipant Thats alright Ernest Thanks again for the help today, I appreciate it. Have an awesome day! Cheers, Tom September 11, 2023 at 3:28 pm #45352 Ernest MarcinkoKeymaster You are very welcome! I will close this topic soon. Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In