I have a list of items which can be displayed both vertically and horizontally:
Currently, toggling between these two modes makes for a rather jarring user experience, since items are repositioned rather suddenly (as CSS classes are being applied/removed). It would help greatly to have each item gradually move to its new position, making it easier for users to keep their orientation.
I know jQuery's animate method doesn't work for float. While I can imagine a solution, it seems rather complex:
- create an invisible clone of each item
- apply the desired style (vertical/horizontal)
- record the clones' new position
- delete the clones
- animate the actual items to the recorded positions
- apply the desired style to the actual items
- remove inline styles from animation
Before I go about reinventing the wheel, does anything like this already exist?