Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Not responding after 1 time clicking › Reply To: Not responding after 1 time clicking
October 25, 2016 at 12:51 pm
#10599
Thank you! Which part needs to be in the function.php?
This one?
———————————
add_action( ‘wp_footer’, ‘asp_prevent_double_tap’ );
function asp_prevent_double_tap() {
?>
<script>
jQuery(function($){
$(‘.results’).on(‘click touchend’, ‘.item’, function(e){
e.preventDefault();
e.stopImmediatePropagation();
e.stopPropagation();
window.location.href = $(‘a.asp_res_url’, this).attr(‘href’);
});
});
</script>
<?php