Initiate CSS3 animations on each individual slide within the slider

I have integrated flex slider into my project.

There are 3 CSS3 animations implemented, where the animations work perfectly on the first slide when the website loads. However, upon switching to the second slide, the animations do not start.

I am seeking assistance in initiating the CSS animations while the slideshow transitions between slides.

Below is my JavaScript code for initializing the slider:

$(window).load(function(){
    $('._il_slider_box_wrapper_').flexslider({
        animation: "slide",
        start: function(){
            $('._il_slider_box_wrapper_').resize();
        }
    });
});

Here is a snippet of my HTML structure:

    <ul class="slides">
        <li>
            <img src="../main_slide_tab_1.jpg" style="margin-bottom: -4px;" class="_il_slider_box_wrapper_img_" />

            <span class="_il_slider_box_slide_wrapper_"></span>

            <span class="_il_slider_box_slide_box_">

                <span class="_il_slider_box_slide_box_block_">
                    <span class="_il_slider_box_slide_box_sub_">
                        <span class="_il_slider_box_slide_box_icon_block">
                            <span class="_il_slider_box_slide_box_icon_">
                                <img src="../_il_lock_icon_slide_.png" style="width: 75px;margin-top: 30px;" />
                            </span>
                        </span>
                        <span class="_il_slider_box_slide_box_title_">Segregated Bank Accounts</span>
                    </span>

                </span>

            </span>

        </li>

    </ul>

The CSS animations that need to run on every slide involve these elements:

._il_slider_box_slide_box_icon_
._il_slider_box_slide_box_title_

Here is the CSS styling for the class ._il_slider_box_slide_box_icon_:

._il_slider_box_slide_box_icon_{  
  -webkit-animation: _il_animation_roll_ 1s ease-out both, _il_animation_fadeIn_ 1s ease-out both;
  -moz-animation: _il_animation_roll_ 1s ease-out both, _il_animation_fadeIn_ 1s ease-out both;
  -o-animation: _il_animation_roll_ 1s ease-out both, _il_animation_fadeIn_ 1s ease-out both;
  -ms-animation: _il_animation_roll_ 1s ease-out both, _il_animation_fadeIn_ 1s ease-out both;
  animation: _il_animation_roll_ 1s ease-out both, _il_animation_fadeIn_ 1s ease-out both;
}

The CSS styling for the class ._il_slider_box_slide_box_title_ is as follows:

._il_slider_box_slide_box_title_{
  -webkit-animation: _il_animation_moveUp_ 1s ease-in-out both;
  -moz-animation: _il_animation_moveUp_ 1s ease-in-out both;
  -o-animation: _il_animation_moveUp_ 1s ease-in-out both;
  -ms-animation: _il_animation_moveUp_ 1s ease-in-out both;
  animation: _il_animation_moveUp_ 1s ease-in-out both;
}

Keyframes definitions for the animations:

@-webkit-keyframes _il_animation_roll_{
  0% {-webkit-transform: translateX(-500px) rotate(-360deg);}
  100% {-webkit-transform: translateX(0px) rotate(0deg);}
}
@-moz-keyframes _il_animation_roll_{
  0% {-moz-transform: translateX(-500px) rotate(-360deg); opacity: 0;}
  100% {-moz-transform: translateX(0px) rotate(0deg); opacity: 1;}
}
@-o-keyframes _il_animation_roll_{
  0% {-o-transform: translateX(-500px) rotate(-360deg); opacity: 0;}
  100% {-o-transform: translateX(0px) rotate(0deg); opacity: 1;}
}
@-ms-keyframes _il_animation_roll_{
  0% {-ms-transform: translateX(-500px) rotate(-360deg); opacity: 0;}
  100% {-ms-transform: translateX(0px) rotate(0deg); opacity: 1;}
}
@keyframes _il_animation_roll_{
  0% {transform: translateX(-500px) rotate(-360deg); opacity: 0;}
  100% {transform: translateX(0px) rotate(0deg); opacity: 1;}
}


@-webkit-keyframes _il_animation_fadeIn_{
  0% {opacity: 0;}
  100% {opacity: 1;}
}
@-moz-keyframes _il_animation_fadeIn_{
  0% {opacity: 0;}
  100% {opacity: 1;}
}
@-o-keyframes _il_animation_fadeIn_{
  0% {opacity: 0;}
  100% {opacity: 1;}
}
@-ms-keyframes _il_animation_fadeIn_{
  0% {opacity: 0;}
  100% {opacity: 1;}
}
@keyframes _il_animation_fadeIn_{
  0% {opacity: 0;}
  100% {opacity: 1;}
}


@-webkit-keyframes _il_animation_moveUp_{
  0% {-webkit-transform: translateY(40px);}
  100% {-webkit-transform: translateY(0px);}
}
@-moz-keyframes _il_animation_moveUp_{
  0% {-moz-transform: translateY(40px);}
  100% {-moz-transform: translateY(0px);}
}
@-o-keyframes _il_animation_moveUp_{
  0% {-o-transform: translateY(40px);}
  100% {-o-transform: translateY(0px);}
}
@-ms-keyframes _il_animation_moveUp_{
  0% {-ms-transform: translateY(40px);}
  100% {-ms-transform: translateY(0px);}
}
@keyframes _il_animation_moveUp_{
  0% {transform: translateY(40px);}
  100% {transform: translateY(0px);}
}

Answer №1

To help us better understand, please share your CSS code as animations are done in CSS, not JavaScript.

//REMINDER: You have the capability to create this slider using only CSS3 @keyframe animations without any JavaScript.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

JSON representing an array of strings in JavaScript

Encountering difficulties when trying to pass two arrays of strings as arguments in JSON format to call an ASMX Web Service method using jQuery's "POST". The Web Method looks like this: [ScriptMethod(ResponseFormat=ResponseFormat.Json)] publ ...

Unable to view Bootstrap modal upon click

Whenever I attempt to display a modal using Bootstrap, it mysteriously appears upon page refresh but fails to show up when the button is clicked. Ideally, I want the modal to only appear when the user clicks on the button. The structure of my html file lo ...

The auto-complete feature in Bootstrap tagsinput is malfunctioning

<script type="text/javascript"> $(function () { $('#input-tagautocomplete').tagsinput({ typeahead: { source: function (term, process) { items = []; map = {}; var url = ...

Establishing a connection between Python and MySQL on a Windows operating system using

Here is the source code I am working with: import pymysql import socket conn = pymysql.connect(host='127.0.0.1', unix_socket='/tmp/mysql.sock', user='user', passwd=None, db='extractor') cur = conn.cursor() cur.execu ...

Creating a Mobile-friendly Sidebar: A Guide to Angular 5

I've been seeing a lot of recommendations online about using Angular Material for creating a sidebar, but I'm hesitant to install an entire library just for one component. After following the instructions provided here, I managed to develop a si ...

Modify the appearance of the post-content's color and background when hovering

I am struggling to achieve the goal of changing the background of the search box to transparent and making the search icon white on hover. Any help or suggestions would be greatly appreciated! Below is the code where I want to apply the hover CSS effect: ...

"Top navigation element and anchors now have a permanent fix in place

Having some trouble with the CSS here - anchor links are getting hidden behind the navigation bar. Any ideas on how to fix this? Do you have a suggestion for making sure the anchor link text is visible just below the navigation bar? /* adjust the style a ...

The background image does not appear on the animated div until the browser window is resized

Encountering an unusual problem - I have styled a div element using CSS to be initially hidden: .thediv { width: 100%; height: 87%; position: fixed; overflow: hidden; background-image: url(pics/FrameWithBG1280.png); background-attachment: fixe ...

Conceal the div on larger screens and display it on mobile devices

I have a fixed navigation bar at the top of my website. By default, it is always visible on all pages, but I want to hide it on desktop screens and display it only on mobile devices. Here is what I have implemented: @media (min-width: 992px) { #sp-he ...

HTML/CSS flowchart illustration

Is there a user-friendly method to create a flow or swimline diagram without relying on scripting or tables? Specifically, I'm looking for a way to display different hosts sending packets (with hosts along the X axis, time along the Y axis, and arrows ...

AngularJS is unable to properly show the full calendar on the screen

Currently working with fullcalender.js in conjunction with AngularJS. Encountering an issue where the calendar is not displaying without any error indication, making it difficult to identify the missing component. This marks my initial attempt at combinin ...

What is the best way to retrieve the title element from a loaded iframe?

Looking for a way to create a dynamic title for my iframe without manually coding it in. My goal is to extract the src of the iframe, load that object, and then retrieve the title element from it. I attempted using iframe.contentDocument but encountered ...

Use jQuery AJAX to add a new record to a webmethod and refresh the dropdown list with the updated

After successfully adding a record via a jQuery AJAX call to a web method, I would like to update the dropdown list without using an update panel. What is the most efficient way to accomplish this? Thanks! ...

AngularJS nested menu functionality not functioning properly

I am currently working on a nested menu item feature in AngularJS. I have a specific menu structure that I want to achieve: menu 1 -submenu1 -submenu2 menu 2 -submenu1 -submenu2 angular.module('myapp', ['ui.bootstrap']) .cont ...

Run a PHP function using <button onclick=""> tag

Is it possible to trigger the execution of a PHP script when clicking an HTML button? I am aware that simply calling a PHP function directly from the button's onclick event like this: <button onclick="myPhpFunction("testString")">Button</butt ...

Exploring techniques to maintain search functionality on altered display columns in DataTables.js

How can I ensure that the search functionality works properly on the modified render column in DataTables.js? In the code snippet provided below, my attempts to search data within the render columns are not yielding any results. $('#release-table& ...

Is there a way for me to modify both the label number and text?

Is there a way to dynamically change label text and hide certain labels based on a condition in JavaScript? Appreciate any assistance! $('.radio').on('change', function(e) { if (suma == 1) { // changing question ...

How can I modify the TextField's borderBottom style to be 'none' when it is disabled?

While working within a data cell, I encountered an issue with stacking text. To workaround this obstacle, I opted to create a text field, assign it a value and helper text, disable the field, and change the text color to black when disabled. My current cha ...

What is the best way to extract a JSON string from the login PHP response?

I am working on creating a basic website along with an Android application that both retrieve data from the same database. While I have no issues in dealing with Android, I am facing difficulty in handling JSON strings in HTML. How can I fetch the JSON res ...

The Conflict-Free Dilemma of JQuery Cycle

Everything was working smoothly with the implementation of the JQuery Cycle Plugin. However, as I attempted to link a separate JavaScript file for a Menu in the Head Section from this source , <script type="text/javascript" src="js/ddmegamenu.js"> ...