stop setInterval on mouseleave

stop setInterval on mouseleave

I'm trying to run a function every 1/2sec using setInterval on mouseenter & stop it on mouseleave.

  1. function checkRExist(xInter) {
  2.         if ($('.g-recaptcha-bubble-arrow').length > 0) {
  3.           console.log('reCaptcha Exists');
  4.           clearInterval(xInter);
  5.         }
  6. }

  7. function stopInter(xInter) {clearInterval(xInter)}

  8. $('.g-recaptcha').on('mouseenter', function() {
  9.       console.log('Mouse Enter');
  10.       var xInter = setInterval(checkRExist, 500);
  11. });
  12. $('.g-recaptcha').on('mouseleave', function(xInter) {
  13.       console.log('Mouse Leave');
  14.       stopInter(xInter);
  15. }); 

The mouse enter console shows, and then reCaptcha exists console shows when clicking & then then the mouse leave shows, but then the reCaptcha exists starts all over again.  Would like to stop it once a mouse leave occurs.  What needs to be changed??