I have a list of elements that can be displayed both vertically and horizontally:
http://jsbin.com/olefi3/2
Switching between these two modes currently leads to a rather sharp user experience, as elements move quite suddenly (as CSS classes are applied / removed). This would help a lot, so that each element gradually moves to a new place, which makes it easier for users to orient themselves.
I know that jQuery animation method does not work for float. Although I can imagine a solution, it seems rather complicated:
- create an invisible clone of each element
- apply the desired style (vertical / horizontal)
- record new clone position
- remove clones
- revive actual positions in recorded positions
- apply the desired style to the actual elements
- remove inline styles from animation
Before I start inventing the wheel, does something like this already exist?
source
share