Hi @alexliii,
You can try the following snippet as a workaround:
<?php
add_action( 'wp_footer', function(){
?>
<script type="text/javascript">
jQuery(document).ready(function($){
let hover_elem = $('.entry-title');
if( hover_elem.length ){
let _hustle = '.module_id_14';
if( $(_hustle).length ){
hover_elem.on('mouseenter', function(){
HUI.popupLoad($(_hustle));
});
}
}
});
</script>
<?php
}, 9999 );
You’ll have to update the elements class name in the following line:
let hover_elem = $('.entry-title');
Suppose the class name is “hello-world” the above line will change to:
let hover_elem = $('.hello-world');
You’ll also have to update your popup ID in the following line:
let _hustle = '.module_id_14';
If the popup ID Is 123 then the above line will be:
let _hustle = '.module_id_123';
I mean that I am looking for an alternative way of “add to cart” event trigger, because I can not make it work
Without testing it out it’s tough to say whether the above code would help replace the workflow you have mentioned in the other ticket.
It would be better to stick with any one of the codes, please do the test and follow up on which code snippet you are looking to move forward with so that we could assist further if needed.
Kind Regards,
Nithin