0👍
Rather than manipulating the DOM, you should use v-if on the element itself that turns it on or off based on data. It is a different way of thinking than direct DOM manipulation learned in the jQuery days. Read more in the Vue docs about conditional rendering.
If you are wanting to trigger once the DOM is available, use mounted()
- [Vuejs]-Dynamic css in vue-loader component not working
- [Vuejs]-How to get axios to use server-side caching?
Source:stackexchange.com