I have a <textarea> that I have bound to some data in my state. When a button is clicked, that data changes and instead of having it immediately change in my textarea, I want to fade out what was previously there and have the new data fade in.
HTML
<button id="submit-button" v-on:click="changeData">Change</button>
<textarea id="dataoutput" rows="14" cols="90" v-model="output" readonly>{{ output }}</textarea>
JS
var app = new Vue({
el: '#app',
data: {
output: "Original data output here"
},
methods: {
changeData: function() {
// some calculation here
this.output = // new stuff
}
}
});
I've been reading up on Vue transitions and some CSS transitions as well but I can't seem to wrap my head around how to go about doing that. Any help would be greatly appreciated.
