title: Scroll Up to the previous div when scrolling back to top
body: <p>I am trying to scroll back up to previous section when scrolling back to top. I have the solution for scrolling continuously after last slider. But now i am not able to find for the opposite when scrolling back to top.(continuously scrolling top after fist slider) I have attached the <a href="https://jsfiddle.net/Pavankumar_Kori/pw3svdnr/2/" rel="nofollow noreferrer">jsfiddle</a> and <a href="https://codepen.io/pavankumar_kori/full/jOPbBLY" rel="nofollow noreferrer">codepen</a> snippets for the reference</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function () {
    $('.customer-logos').slick({
      vertical: true,
      infinite: false,
      arrows: false,
      dots: true });
  
  });
  
  const slider = $(".customer-logos");
  
  
  slider.on('wheel', function (e) {
  
    var slideCount = $(this)[0].slick["slideCount"];
    var currentIndex = $(this).slick("slickCurrentSlide");
    var totalSildeToShow = $(this)[0].slick.options["slidesToShow"];
  
    if (e.originalEvent.deltaY &lt; 0) {
      e.preventDefault();
      $(this).slick('slickPrev');
    } else {
      if (slideCount - totalSildeToShow === currentIndex)
      return;
      e.preventDefault();
      $(this).slick('slickNext');
    }
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>h2{
    text-align:center;
    padding: 20px;
  }
  /* Slider */
  
  .slick-slide {
      margin: 0px 20px;
  }
  
  .slick-slide img {
      width:500px;
      height:250px;
  }
  .slick-dots {
      position: absolute;
      bottom: 37% !important;
      display: grid !important;
      width: 0 !important;
      padding: 0;
      margin: 0;
      list-style: none;
      text-align: center;
      top: 15%;
      right: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://code.jquery.com/jquery-2.2.0.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="https://unpkg.com/slick-carousel@1.7.1/slick/slick.css"&gt;
  &lt;link rel="stylesheet" href="https://unpkg.com/slick-carousel@1.7.1/slick/slick-theme.css"&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" /&gt;
  &lt;section style="height: 100vh;background: #f436e3"&gt;&lt;/section&gt;
  &lt;h2&gt;Our Partners&lt;/h2&gt;
  &lt;div class="container"&gt;
  &lt;div class="row"&gt;
  &lt;div class="col-md-6"&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed gravida, metus sit amet ornare pretium, sem velit facilisis arcu, id laoreet nibh augue ac justo. Duis pellentesque, elit id semper gravida, tellus ante porttitor nisl, et molestie nisi elit eu libero. Suspendisse ornare tincidunt tellus, vitae fermentum enim suscipit vitae. Proin et nisl sed neque commodo euismod aliquet consequat lectus. Integer vitae quam rhoncus, blandit enim ut, mollis justo. Donec pulvinar ex in facilisis venenatis. Ut ullamcorper eros sit amet leo dictum elementum eget sed urna.&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class="col-md-6"&gt;
  &lt;div class="customer-logos slider"&gt;
  &lt;div class="slide"&gt;&lt;img src="https://image.freepik.com/free-vector/luxury-letter-e-logo-design_1017-8903.jpg"&gt;&lt;/div&gt;
  &lt;div class="slide"&gt;&lt;img src="https://image.freepik.com/free-vector/3d-box-logo_1103-876.jpg"&gt;&lt;/div&gt;
  &lt;div class="slide"&gt;&lt;img src="https://image.freepik.com/free-vector/blue-tech-logo_1103-822.jpg"&gt;&lt;/div&gt;
  &lt;div class="slide"&gt;&lt;img src="https://image.freepik.com/free-vector/colors-curl-logo-template_23-2147536125.jpg"&gt;&lt;/div&gt;
  &lt;div class="slide"&gt;&lt;img src="https://image.freepik.com/free-vector/abstract-cross-logo_23-2147536124.jpg"&gt;&lt;/div&gt;
  &lt;div class="slide"&gt;&lt;img src="https://image.freepik.com/free-vector/football-logo-background_1195-244.jpg"&gt;&lt;/div&gt;
  &lt;div class="slide"&gt;&lt;img src="https://image.freepik.com/free-vector/background-of-spots-halftone_1035-3847.jpg"&gt;&lt;/div&gt;
  &lt;div class="slide"&gt;&lt;img src="https://image.freepik.com/free-vector/retro-label-on-rustic-background_82147503374.jpg"&gt;&lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;section style="height: 100vh;background: #f436e3"&gt;&lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>