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


source to share





All Articles