M
M
myskypesla2017-09-12 19:29:38
Vue.js
myskypesla, 2017-09-12 19:29:38

How to destroy fullpage.js when switching between routes?

Hi all.
There is a site from 5 pages. Each page is a router.
On the main page in mounted() I initialize fullpage.js. Everything is ok at this stage.
But when I go to another page (the router changes), then html and body have classes and styles that were added by the fullpage.js plugin and which break the layout on other pages.
The plugin has a destroy("all") function that removes all initialization and everything associated with the plugin. I tried to run it in router/index.js with the beforeRouteLeave method, it doesn't work.
How can the problem be solved?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question