Functions not work untill i refresh

Hello, when i navigate on a different page, all the functions are not working.
Ex :

var conf_slider = app.swiper.create('.swiper', {
   speed: 400,
    spaceBetween: 100,
    allowTouchMove: false

I get an error :

conf_slider.slideTo is not a function
    at HTMLImageElement.b.onclick

untill i refresh the page on my browser.
What can i do?
Working with JS