On the problem of initializing fullpage multiple times

the effect you want to achieve is that the navigation bar is a tab page, click a different tab to switch the corresponding page, and the corresponding page scrolls full screen.
the problem now is that every time you click on the tab tab, initialize the fullpage, after the page is loaded, but the Navigation navigation icon on the left will be superimposed repeatedly, and the click will not work, and the full screen scrolling will be random.
try to destroy, but report an error when clicking on the tab tab.
error message: Uncaught TypeError: $. Fn.fullpage.destroy is not a function,

Code:

        function switchEcTab(tabIndex) { //tab
            $.fn.fullpage.destroy("all"); 
            ....
        }

have you ever met a great god? get down on your knees and ask for answers!

Feb.28,2021
Menu