Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Clicking on a suggested search keyword › Reply To: Clicking on a suggested search keyword
September 18, 2023 at 1:58 pm
#45413
Keymaster
Sure, I think it’s still doable.
Please try this variation instead:
add_action('wp_footer', 'asp_add_footer_script', 99999);
function asp_add_footer_script() {
?>
<script>
jQuery(function($){
$('.asp-try a').on('click', function(e){
$(this).closest('.asp_w_container').find('.promagnifier').trigger('click');
});
});
</script>
<?php
}