Fullpage scroll to next section

Im trying scroll my fullpage to next section if mouseenter

HTML:

</div>
</div> </div>

JS:

$("#fullpage-left").mouseenter(function() {
        if ($('#fullpage-left .current').next('#fullpage-left .section').length > 0) {
            var $next = $('#fullpage-left .current').next('#fullpage-left .section');
            var top = $next.offset().top;

            $('#fullpage-left .current').removeClass('current');

            $('#fullpage-left').animate({
              scrollTop: top     
            }, function () {
                   $next.addClass('current');
            });
        }
    });

Its work fine for only 2 section, next have only class current and no scrollto.
Can anyone help me with this. Thanks in advance.


Source: stackoverflow-javascript