Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- //Start Hero slider initialize code
- $(document).ready(function(){
- var heroSlider = $('.owl-carousel');
- heroSlider.owlCarousel({
- animateOut: 'fadeOut',
- animateIn: 'fadeIn',
- autoplayTimeout:3000,
- autoplayHoverPause: true,
- // smartSpeed :800,
- loop: true,
- margin: 0,
- nav: false,
- mouseDrag:true,
- touchDrag:true,
- pullDrag:false,
- freeDrag:true,
- dots:true,
- autoplay:true,
- responsive: {
- 0: {
- items: 1
- },
- 600: {
- items: 1
- },
- 1000: {
- items: 1
- }
- }
- });
- // End Hero slider initialize code
- // Start Reactivate css animation every time a slide is loaded
- heroSlider.on("changed.owl.carousel", function(event){
- // selecting the current active item
- var item = event.item.index-2;
- // first removing animation for all captions
- $('h1, p').removeClass('fadeInUp');
- $('.owl-item').not('.cloned').eq(item).find('h1, p').addClass(' fadeInUp');
- $('.anim1').removeClass('fadeInUp');
- $('.owl-item').not('.cloned').eq(item).find('.anim1').addClass(' fadeInUp');
- })
- });
- // End Reactivate css animation every time a slide is loaded
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement