I have a javascript code that works in Chrome but it refuses to work in Mozilla Firefox. Why is that so?
My Codepen sandbox.
HTML
<div class="scroll-arrows">CLICK TO SCROLL</div>
CSS
body{
  height: 2000vh;
}
JS
$(document).on('click', '.scroll-arrows', function() {
  return $('body').animate({
    scrollTop: 400
  }, 'slow');
});
 
     
    