From the course: Vue.js 2 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Managing styles with JavaScript
From the course: Vue.js 2 Essential Training
Managing styles with JavaScript
- [Instructor] Transitions and transition groups also create different events that we can track and modify what's happening with our application and our animations. So let's take a look at how that works. Now to do that, I'm going to go into my transition group, which is right here, and I'll get rid of some of these items right here. These animations are now going to be controlled with JavaScript. So I don't need these two right here, and what I'll do is I will use the events that are available, and they look just like the classes that we've been using. So you can say beforeEnter, and we can execute a method. We'll just call it beforeEnter, but you could call it whatever you want. And, then we'll create some other event here, so these are clearly the same thing as typing v-on and then colon. So the shortcut for that is the @ sign, and we'll do whenever we enter, we'll execute a method we'll call, also, enter. And, finally, when we say leave, we'll execute another method called leave…
Contents
-
-
-
-
-
Binding classes with objects and arrays6m 51s
-
(Locked)
Expressions and computed classes5m 49s
-
(Locked)
Toggling computed classes5m 21s
-
(Locked)
Creating transitions and animations4m 58s
-
(Locked)
Using an animation framework2m 54s
-
(Locked)
Working with transition groups4m 2s
-
(Locked)
Managing styles with JavaScript6m 54s
-
-
-
-
-
-
-