Intenté modificar el complemento para mostrar una ventana emergente modal cuando un visitante del sitio web abandona la página usando haschange, pero aún no funciona. ¿Cómo hacer que funcione? necesito ayuda para arreglarlo
$(document).ready(function(e) { var exit_intent_popup_hash = 'b' window.location.hash = exit_intent_popup_hash window.history.back() setTimeout(function() { window.history.forward() $('.fel-modal-parent-wrapper').each(function() { var $this = $(this); var tmp_id = $this.attr('id'); var popup_id = tmp_id.replace('-overlay', ''); var trigger_on = $this.data('trigger-on'); var exit_intent = $this.data('exit-intent'); if ('automatic' == trigger_on) { if ('yes' == exit_intent && FelModalPopup_canShow(popup_id)) { $(window).hashchange(function() { if (window.location.hash !== `#${exit_intent_popup_hash}`) { FelModalPopup_show(popup_id); window.history.forward() } }, false); } } }); }, 500); });