Should I be using jQuery for animation in VueJS?

I currently have this piece of code inside my methods object in a component:

startImageAnimation() {
    $('.splash-image').fadeIn(1400, () => {
        setTimeout(function() {
            $('.splash-image').fadeOut(1400, () => {
                setTimeout(() => {
                    $('.splash-screen').fadeOut(600);
                });
            });
        }, 1000);
    });
},

      

I was really trying to figure out a way to use Vue transitions, but it just looks waaaaay too heavy for something so simple to do with jQuery.

The real question here is, should I still code like this, or should I take a different approach in these situations? Ditto for things like jQuery animate () or any other methods that jQuery makes it much easier than with pure JS.

Thank!

+3
javascript jquery transition vue.js vuejs2


source to share


No one has answered this question yet

Check out similar questions:

7428
How can I check if an element is hidden in jQuery?
5670
Which operator is equal (== vs ===) should be used in JavaScript comparisons?
4523
Thinking in AngularJS if I have a jQuery background?
4345
How can I check if a checkbox is checked in jQuery?
3953
What value of "href" should be used for JavaScript references, "#" or "javascript: void (0)"?
3952
Setting "checked" for a checkbox with jQuery?
2644
Is there a function "exists" for jQuery?
2302
Add table row in jQuery
2101
jQuery scroll to element
1957
Disable / enable input with jQuery?



All Articles
Loading...
X
Show
Funny
Dev
Pics