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

Reply To: Ajax Search Pro not working inside an Elementor Popup

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Ajax Search Pro not working inside an Elementor Popup Reply To: Ajax Search Pro not working inside an Elementor Popup

#23671
Ernest MarcinkoErnest Marcinko
Keymaster

Hi 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:

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
}