Removing scroll to top behavior breaks everything else

Hello and thank you in advance for help with my problem.

I have a scroll to top behavior on reload or refresh that I want to remove but for some reason removing that behavior stops the js from working (the drop downs no longer open on mobile viewports).

and the js I am trying to disable:
//scroll to top function
$(function(){
$(document).on( ‘scroll’, function(){
if ($(window).scrollTop() > 100) {
$(’.scroll-top-wrapper’).addClass(‘show’);
} else {
$(’.scroll-top-wrapper’).removeClass(‘show’);
}
});
$(’.scroll-top-wrapper’).on(‘click’, scrollToTop);
});

There is also this JS that I left alone because it deals with my mobile buttons:

$( document ).ready(function() {
// run these on all pages:
scrollToTop();
mobileMenu("#mobile-nav-btns ul.top-level li", “#mobile-nav-menus ul”);
mobileStickyHeader("#mobile-nav-wrap");

// run these on appropriate pages:
if($(“body.list-template”).length > 0){
imageWidth = $("#content .item .image").width();
loadImages("#content .item .image");

}else if($("body.detail-template")) {
	imageWidth = $("#content .image").width();
	loadImages("#content .image");
}

});

I inherited this template and although I’m good at html/css JS is tougher. Any idea how I can disable the scroll to top and still have my mobile drop downs work? Thank you!