I have a simple table to which the user can add rows. The interface is very similar to this:
https://jsfiddle.net/fgu4q8j0/1/
<div id="app">
<table class="list">
<tr v-for="(task,index) in tasks">
<td>{{index+1}}.</td>
<td>{{task.text}}</td>
</tr>
</table>
<input type="text" v-model="newTask" />
<button type="button" @click="tasks.push({text: newTask})">Add</button>
</div>
new Vue({
el: "#app",
data: {
newTask: "",
tasks: [{text: 'task1'}, {text: 'task2'}]
}
});
I want to create highlight effect when a new row is added, which decays slowly - very similar to the orange highlight effect that Stack Overflow has when you click a url that contains a hash (#) to a specific answer/comment.
As I see, Stack Overflow uses jQuery for animation. I look for a CSS only solution, hopefully without doing anything more than tasks.push(..), and maybe integrates into vue transition system.