Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Ajax Search Pro not working inside an Elementor Popup
This topic contains 7 replies, has 2 voices, and was last updated by Arnau 3 years, 10 months ago.
- AuthorPosts
- July 9, 2019 at 2:47 pm #23668
Hi there,
Ajax Search Pro is working fine with Elementor, except if the search form is inside a popup created with Elementor Pro. In this case, there are not automatic results shown.
In the URL there are 2 Ajax forms: One in the middle of the page, wich is working fine, and another inside an Elementor Popup that can be opened clicking in the magnifying glass icon in the header. This is not working.
The search form is the same in both cases.
Is there a way to solve ti?
Thanks,
Arnau
July 9, 2019 at 3:02 pm #23671Hi Arnau,
Thank you for all the details! Since you added temporary FTP and back-end details, I have fixed the issue by adding a small custom code snippet to the functions.php file in your theme directory.
The problem is, that elementor always clones the pop-up contents, which basically resets the event handlers, thus it won’t work. The code checks when the icon is clicked, and tries to re-initialize the plugin, and should bypass the problem.
For future reference, this is the custom code:
Best,add_action('wp_footer', 'asp_fix_fa_icon_click'); function asp_fix_fa_icon_click() { ?> <script> jQuery(function($){ $('.fa.fa-search').on('click', function(){ setTimeout(function(){ ASP.initialize(); }, 500); }); }); </script> <?php }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 10, 2019 at 9:58 am #23683Hi Ernest,
Thanks a lot for this great and fast solution!
July 10, 2019 at 11:16 am #23684You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 10, 2019 at 1:35 pm #23690You cannot access this content.July 10, 2019 at 1:44 pm #23691Hi,
Thank you!
I am not sure if I can replicate that issue. I tried closing the pop-up with the X button, as well as by clicking on the document, but the results close as well. Is this happening in a specific way?
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 10, 2019 at 9:09 pm #23699Hi Ernest.
I can’t replicate the issue also. It seems to work fine.Thanks a lot, again!
July 11, 2019 at 5:05 pm #23700You cannot access this content. - AuthorPosts
You must be logged in to reply to this topic.