Answer the question
In order to leave comments, you need to log in
How to make animation of owl carousel inner elements?
Recently, I asked a question similar to this, but now I'm a little more advanced in finding a solution. What I'm doing: I'm trying to animate the inner elements of the carousel while sliding. Here is the code that I got:
var owl = $('.owl-carousel');
owl.owlCarousel();
owl.on('changed.owl.carousel', function(event) {
$(".header-text").removeClass("slider-text-anim");
if ( $(".owl-item").hasClass("active") ) {
$(".header-text").addClass("slider-text-anim");
}
else {
$(".header-text").removeClass("slider-text-anim");
}
});
Answer the question
In order to leave comments, you need to log in
There are scripts in which this is already implemented, perhaps it is worth using a ready-made one?
For example:
bayguzin.ru/demo/ParallaxContentSlider
jacksbox.de/stuff/jquery-fractionslider
https://www.sequencejs.com/
Actually, you can search for similar ones by query " parallax slider "
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question