Exit Intent in Mobile using java scrpt

I want to modify the popup plugin, where the popup doesn’t work on mobile devices.
And this is the code that calls the exit intent popup


  $(document).on('mouseleave', function (e) {

    if (e.clientY > 20) {
      return;
    }

    $('.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)
        ) {
          FelModalPopup_show(popup_id);
        }
      }
    });
  });