razorjack / quicksand

jQuery plugin. Reorder and filter items with a nice shuffling animation.
https://razorjack.net/quicksand/
GNU General Public License v2.0
1.86k stars 338 forks source link

Adding group titles #58

Closed walidvb closed 6 years ago

walidvb commented 13 years ago

Hi!

Your plug-in is great and looks amazing! However, I have an issue, been on it for ages now, and i can't seem to figure out what would be the right way to approach it. If you take a look at my try, it will be a lot faster to explain: http://vbbros.net/d6/projects

Basically, I'm trying to reorder a list by data-, and then add a title before the first element of each data- value. Problem is, i want the newly created subLists to be in divs, so that they are displayed in blocks..

So basically, my lists are broken into subparts, which completely breaks the animation effect :(

I thought of perhaps doing something like:

for each term: filter data create a new div in the target dev calling quicksand from that div to the filtered data

but then again, i don't understand how you use the positions and all. It would be great if you could give me a hand on that!

my quicksand is all in a quicksand.js file ;)

Thanks in advance!

Walid

razorjack commented 6 years ago

To make quicksand feasible and fast, I needed to make certain assumptions about the markup. So, the source container contains items and these items are going to be animated in the same form. The plugin architecture doesn't allow to modify the markup during the animation, we just take what we have and move it around to create an animation effect. However, I think that with a little bit of additional CSS, you'll visually get what you want while also retaining ability to use Quicksand.