How To Disable Mouse Enter Event and Only Detect Mouse Move to Left or Right

How To Disable Mouse Enter Event and Only Detect Mouse Move to Left or Right

Can you please take a look at This Demo and let me know how I can disable any animation on Mouse-enter in the  #carousel-example-generic   ?  I want to apply the  .css() rules  ONLY when the mouse is moving to Left or Right on the  #carousel-example-generic  ? 

what is happening now is, as soon as the mouse enters into the  #carousel-example-generic  jQuery is running the CSS rule but I want to do it only when the mouse is moving to left or right.

Here is the code I have

  1. var startingPos = 0;
  2. $('#carousel-example-generic').mousemove(function(e) {
  3.   var x = e.pageX - this.offsetLeft;
  4.   var y = e.pageY - this.offsetTop;
  5.   var xPercent = x / $(this).width() * 100
  6.   var yPercent = y / $(this).height() * 100
  7.   var moveMouse = (e.pageX * -1 / 3);
  8.   if (startingPos == 0) {
  9.     startingPos = moveMouse;
  10.     return;
  11.   } else {
  12.     moveMouse = moveMouse - startingPos;
  13.   }
  14.   jQuery('#img-1').css({
  15.     'left': moveMouse + 'px'
  16.   });
  17.   jQuery('#img-2').css({
  18.     'left': moveMouse + 'px'
  19.   });
  20. });

  21. jQuery('#carousel-example-generic').mouseleave(function() {
  22.   jQuery('#img-1').animate({
  23.     'left': '0'
  24.   });
  25.   jQuery('#img-2').animate({
  26.     'left': '0'
  27.   });
  28. });
Thanks