The Joys of Delayed Animation with jQuery Isotope

Has anyone successfully modified the CSS3 transitions in jquery Isotope to incorporate a delay for shuffling items, such as using "transition-delay: 0s, 1s;"?

I am aiming for a specific shuffle direction - first left, then down - to create a more calculated effect when filtering (as opposed to the default diagonal shuffle). However, any alterations made to the default CSS3 transitions do not seem to work.

Below is my current CSS:

/**** Isotope Animating ****/
.isotope,
.isotope .isotope-item {
  /* adjust duration value accordingly */
  -webkit-transition-duration: 0.7s;
     -moz-transition-duration: 0.7s;
       -o-transition-duration: 0.7s;
          transition-duration: 0.7s;
}

.isotope {
  -webkit-transition-property: height, width;
     -moz-transition-property: height, width;
       -o-transition-property: height, width;
          transition-property: height, width;
}

.isotope .isotope-item {
  -webkit-transition-property: -webkit-transform, opacity;
     -moz-transition-property:    -moz-transform, opacity;
       -o-transition-property:         top, left, opacity;
          transition-property:         transform, opacity;
}

Any insights or suggestions would be greatly appreciated!

Answer №1

For a helpful demonstration, visit http://jsfiddle.net/desandro/QwWv7/

To apply a delay to each CSS property being transitioned, it is necessary to adjust the positioning method due to transforms combining X & Y translation in one transform. By utilizing absolute or relative positioning and setting separate delays for both left and top, you can achieve this. Ensure that transformsEnabled: false is included in your options.

$container.isotope({
  itemSelector: '.item',
  transformsEnabled: false
});

Next, modify the transition-property CSS to include properties for top and left transitions.

.isotope .isotope-item {
  /* multiple -vendor declarations omitted for brevity */
  transition-property: left, top, opacity;
}

To implement delays for these properties, add values for transition-delay. Note that only top should be delayed in this scenario.

.isotope .isotope-item {
  transition-delay: 0s, 0.8s, 0s;
}

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

Arrange the child elements of a div to be displayed on top of one another in an HTML document

I am struggling with a div containing code .popupClass { width: 632px; height: 210px; position: absolute; bottom:0; margin-bottom: 60px; } <div class="popupClass"> <div style="margin-left: 90px; width: 184px; hei ...

Retrieving JSON data in a Blade view from both the model and controller

I am currently in the process of converting an older PHP script into Laravel. The original script is functioning properly, as it displays data on a jQuery fullcalendar. However, I am now attempting to integrate this functionality into a Laravel project. M ...

Refresh the jQuery dependency within the Hangfire Dashboard

Do we have to create a pull request, or is it possible to achieve under an installed NuGet package? ...

Embracing JQuery for Frontend Development with Node.js

I'm currently enhancing my node.js skills by utilizing express, and I've encountered a situation that is causing me some confusion. Essentially, when a user requests a webpage and the backend sends them the HTML page, how can I incorporate a Java ...

Moving draggable items out of a div and placing them into a designated droppable area

I'm facing an issue with dynamically creating draggable "divs" within a "table" and trying to make them drop into multiple droppable areas. The problem is that when I drag the element, it leaves a gap and upon dropping, it lands in multiple places ins ...

Experiencing inconsistencies with CSS on certain devices?

When faced with a research issue, I usually turn to Google for answers. However, this time, I was unsure of where to begin. As part of my efforts to enhance my frontend development skills, I undertook The Odin Project and worked on a calculator project. U ...

Are you experiencing a clash among various JS files in your WordPress installation?

I'm in a bit of a bind here. I've been tasked with working on a Wordpress website for a friend, using a free theme that he provided. Naturally, he wants some modifications made, so I've been editing the theme accordingly. The theme relies on ...

Integrating JSON with the DOM

Currently, I am searching for a library that offers a simple method to bind JSON data to existing DOM elements that have been generated by a Rails view template. The main reason behind this requirement is that my application features in-place editing (uti ...

Looking for tags similar to stackoverflow?

Is there a way to create a search box similar to the one in Tags where tag names are displayed immediately upon entering without pressing enter key? Could anyone provide me with a script or tutorial on how to achieve this? Is it done using JavaScript or j ...

Can anyone provide guidance on how to create this particular shadow effect using CSS?

Is there a method to use CSS to create a green shadow in that particular shape? ...

"Maximizing efficiency with Jquery and handling multiple AJAX requests simultaneously on a

Thumbnails are displayed on a page in the following manner: <div id="credits"> <a href="largeimage1.jpg" alt="credits1.php"><img src="thumb1"></a> <a href="largeimage2.jpg" alt="credits2.php"><img src="thumb2"></a> ...

Having issues with the input event not triggering when the value is modified using jQuery's val() or JavaScript

When a value of an input field is changed programmatically, the expected input and change events do not trigger. Here's an example scenario: var $input = $('#myinput'); $input.on('input', function() { // Perform this action w ...

Using Jquery with an SQL data table

Currently in the process of learning Jquery and I am trying to display my SQL table on my webpage. My Jquery script is set up to match the structure of the SQL table, and my web.config file is configured correctly. However, the data is not loading when I t ...

Issue with AnimeJS Motion Path causing element to deviate from desired SVG path

I'm attempting to use an SVG element and the AnimeJS library to make the orange marker follow the course of this RC car race track. https://i.stack.imgur.com/8FKHC.png Despite my efforts, I am encountering strange and undesirable outcomes. At times ...

Tips for effectively transmitting and managing a JSON object within an ASP.NET MVC controller

I am currently working on a project using ASP.NET MVC 4 and I'm facing an issue with sending a JSON object to a controller that is supposed to accept it. Here is the snippet of javascript and jQuery code I am using: var jsonObject = { "PlantShip ...

I have a dynamic form code that allows users to insert data by adding multiple inputs in a row. However, I would like to modify it so that the inputs are added in a column instead

I found this code online that allows users to add extra inputs, but it currently only creates new rows in the database. I would like these inputs to be inserted into different columns within the same row. How can I modify it to achieve this? I have alread ...

How can I use Angular to automatically check a checkbox while a page is loading?

I have a list of checkboxes, and based on the selected checkbox, offers are displayed. Everything is working fine as expected. Below is the code snippet I have implemented: function Test1Controller($scope) { var serverData = ["Samsung Galaxy Note ...

Adding and removing classes in JQuery based on a specific div ID

Is there a way to use addClass() and removeClass() on divs with different class names, identified by their unique ids? Any suggestions on how to make this functionality work? Here is the JavaScript code snippet: $(document).ready(function() { $("#bu ...

Run code snippets within summaries

I am seeking assistance with JQuery. Currently, I have checkboxes populated in the following manner: <span class="checked"> <input class="cbid" type="checkbox" name="cb1"> </span> <span > <input class="cbid" type="checkbox" ...

Display a persistent bar on the page until the user reaches a specified <div> element through scrolling

Looking to implement a sticky bar at the bottom of my page that fades out once the user scrolls to a specific div and then fades back in when scrolling up and the div is out of view. This bar should only appear if the user's screen size is not large ...