Personalization: Why can not I make the data splitter work in this navigation menu on a WordPress theme with Bootstrap?

It's costing me a lot to get a navigation to work on this site, which is a WordPress site that uses a boot theme from Bootstrap. I inherited the site and I would like the navigation to work correctly as soon as possible.

The code for the navigation block;

 

The code for the JS using the menu; It's just part of the huge JS file that you can see here.

$ (function () {
function t (t) {
$ ("html, body"). animate ({
scrollTop: t.offset (). top - 100
}, 0)
}
$ ("# mobile-logo"). is (": visible") && $ ("# navbar a"). on ("click", function (t) {
$ (". hamburger-box"). click ()
}), ""! == window.location.hash && t ($ (window.location.hash.replace ("nav-", ""))), $ ("# navbar a, .scroll-to-div") .on (" click ", function (e) {
"/" === window.location.pathname && (e.preventDefault (), location.hash = $ (this) .data ("div"), t ($ ("#" + $ (this) .data ( "div"))), $ ("# navbar li"). removeClass ("active"), $ (this) .parent (). addClass ("active"), location.hash.replace ("#", " "))
})
})

and the functions.php file, the code block that I'm using where I try to get the data div to go to the label to, but call the correct page that corresponds with the correct menu item.

/ *
* Add displacement class to div in the main navigation  Links and data divider for the jump to.
* /
add_menuclass ($ ulclass) {function
return preg_replace (& # 39; / <a / & # 39 ;, & # 39; <a class = "scroll-to-div" & # 39 ;. & # 39; data-div = ""& # 39 ;, $ ulclass, 1);
}
add_filter (& # 39; wp_nav_menu & # 39 ;, & # 39; add_menuclass & # 39;);

My problem is that the navigation and everything work well in this development site here. That does not even have the data div But everything works as it should.

The live site does not. Throw a TypeError t.offset (...) is not defined; You can not access your "superior" property.

I've been in this for 3 days and I finally broke up and decided to post here to see if there was anyone who knew how to make this work.

Thank you.