How to do a Fade in/out on Pagination with AJAX

Hi everyone,
I’m fairly new to drupal, but I have a view that has two pages. I have attached a mini-pager that uses Ajax that can switch between the pages without reloading. I tried adding some Javascript that would fire when the AJAX request starts on my view and would make it fade out momentarily, and then, when it loads again, fades back in. This is the code I am currently using to do this:

var $ = jQuery;

$(document).ajaxStart(function(){
   $('.teaser-content').fadeTo(600, 0);
});
$(document).ajaxSuccess(function(){
   $('.teaser-content').fadeTo(600, 1.0);
});

However, it’s firstly, triggering when the page loads (which makes sense I suppose, but how do I stop it?), and also, when I click to see the second page, it fades away, but when the page loads, it doesn’t fade in. It just loads normally. What’s going wrong here?

I’m using Drupal 8

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed