jQuery - on click and addClass (with CSS transition animation)

0 votes
138 views
added Dec 5, 2018 in jQuery by LC Marshal Captain (25,770 points)
$('.banderole .trigger-close').on('click', function(){
    $('.banderole .slide-trigger').addClass('trigger-in');
});

 

CSS

.trigger-in {
    left: -120px;
    transition: all .5s .2s ease-in-out;
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...