This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Smooth Scroll to #links | with Off-Set ==================================== // | |
//get all # links in the document | |
let links = document.querySelectorAll('a[href*="#"]'); | |
// console.log(links); | |
//assign a click event to all the # links | |
for(let l = 0; l < links.length; l++) { | |
links[l].addEventListener('click', scrollMe, false); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
export default { | |
mounted: function () { | |
this.$nextTick(function () { | |
this.onResize(); | |
}) | |
window.addEventListener('resize', this.onResize) | |
}, | |
methods: { | |
onResize() { |