title: How to detect top right bottom left screen area JavaScript
body: <p><a href="https://i.stack.imgur.com/cYQQ0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cYQQ0.png" alt="enter image description here"></a></p>
  
  <p>How to detect top right bottom left screen area JavaScript? I have four arrow for slider but I wanna display only when mouse hover on particular area.</p>
  
  <pre><code>$('.container').mousemove(function (e) {
  if (e.clientY &lt; $('.container').height() / 2) {
      console.log('top');
  } else {
      console.log('bottom');
  }
  if (e.client X &lt; $('.container').width() / 2) {
      console.log('left');
  } else {
      console.log('right');
  }
  });
  </code></pre>