Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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');
        }
        }
Comment

vuejs scroll to top

scrollToTop() {
window.scrollTo(0,0);
}
Comment

scroll to top vue

 methods: { 
           scrollToTop() {
                window.scrollTo(0,0);
           }
        }
Comment

scroll to top vue

<router-link @click.native="$scrollToTop">
Comment

PREVIOUS NEXT
Code Example
Javascript :: link in angular 
Javascript :: sequelize test connection 
Javascript :: flutter parse json 
Javascript :: javascript check if string is number 
Javascript :: mongodb add admin user 
Javascript :: remove first and last character javascript 
Javascript :: how to remove special characters from a string in javascript using regex 
Javascript :: lodash remove undefined values from array 
Javascript :: react flip move 
Javascript :: celsius to fahrenheit in javascript 
Javascript :: exec js 
Javascript :: js check tab active 
Javascript :: iterate 0 to n using for loop javascript 
Javascript :: js transition 
Javascript :: javascript format number with K M 
Javascript :: react onclick div 
Javascript :: bootstrap in react 
Javascript :: get query params from url javascript 
Javascript :: show ajax error wordpress 
Javascript :: javascript sort array strings alphabetically 
Javascript :: remove div by class name javascript 
Javascript :: indexof vs findindex 
Javascript :: remove empty element from array js 
Javascript :: js inline if 
Javascript :: get parent html js 
Javascript :: jquery form validation plugin callback function 
Javascript :: read json from file js 
Javascript :: angular elementref 
Javascript :: conditional object spread 
Javascript :: combinereducers 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =