title: How to animate slimScroll using jQuery
body: <p>How can I animate this using jQuery? I'm trying to create a smooth scroll-to function when the user clicks the span <code>p1c1</code>. The slimScroll is working, but I'm not sure how to incorporate an animation function into this. Should I try tweening?</p>
  
  <pre><code>$('.p1c1').on("click", function(){
      var fromTop = $('.p2c1').position().top;
      $("#panel2").slimScroll({ scrollTo: fromTop  });
  });
  </code></pre>
  
  <p>This is the type of animation I'm trying to do, but within my slimScroll panel:</p>
  
  <pre><code>$('html, body').animate({
      scrollTop: $(".middle").offset().top
  }, 2000);
  </code></pre>
  
  <p>Here is the slimScroll library: <a href="https://github.com/rochal/jQuery-slimScroll/" rel="nofollow">https://github.com/rochal/jQuery-slimScroll/</a></p>