title: Simplebar scrollbar plugin - Scroll to top / reset position in function
body: <p>I need to be able to scroll back to the top of a page within my ui-routed angular one-page site when a function is triggered, but I've used the simplebar scrollbar plugin as a custom scroller, so can't use the window scrolltop method to take the user back to the top of the page.</p>
  
  <p>I can't use any window/document scrolling method as the container that utilises simplebar is a fixed 100vh container, therefore the window is always scrolled to the top.</p>
  
  <p>I've tried using the jquery method below to reset the position of the scrollbar back to the top, but can't get it working, and there are no error messages in the console.</p>
  
  <pre><code>angular.element('#mainContent').simplebar('getScrollElement').scrollTop(0);
  </code></pre>
  
  <p>I've also tried this in plain js, which returns 'is not a function' in the console:</p>
  
  <pre><code>var mainContent = new SimpleBar(document.getElementById('mainContent'));
  </code></pre>
  
  <p>mainContent.SimpleBar.getScrollElement().scrollTop = 0;</p>