Answers for "vuejs scroll to top"

1

scroll to top vue

// add scroll to top when a is clicked (routes)
<a @click="scrollToTop(), goToPricing()">Pricing</a>

 methods: {
        scrollToTop() {
            window.scrollTo(0, 0);
        },  goToPricing() {
            this.$router.push('/pricing');
        }
        }
Posted by: Guest on November-10-2020
1

vuejs scroll to top

scrollToTop() {
window.scrollTo(0,0);
}
Posted by: Guest on April-27-2021
0

scroll to top vue

methods: { 
           scrollToTop() {
                window.scrollTo(0,0);
           }
        }
Posted by: Guest on November-10-2020
0

scroll to top vue

<router-link @click.native="$scrollToTop">
Posted by: Guest on November-10-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language