title: Stop jquery library after route change in Angular
body: <p>I use the following jquery library to convert vertical scroll to horizontal scroll. </p>
  
  <pre><code>ngOnInit() {
    $(function() {
      $('html, body').mousewheel(function(event, delta) {
          document.querySelector('.coverflow').scrollLeft -= (delta / 4);
      });
    });
  }
  </code></pre>
  
  <p>It works fine, but changing the route will return errors. </p>
  
  <blockquote>
    <p>ERROR TypeError: Cannot read property 'scrollLeft' of null</p>
  </blockquote>
  
  <p>Obviously that's because after changing the route, <code>.coverflow</code> won't exist anymore - <strong>but how do I stop Angular from executing the code</strong> f.e. inside of <code>ngOnDestroy</code>?</p>