Fx.Sort

With Fx.Sort you can reorder a group of items with a transition.

Notice: Fx.Sort does not, by default, reorder the DOM; it just puts the elements into x/y locations that imply the sort, but their location in the DOM remains unless you execute Fx.Sort:rearrangeDOM.

  • Demo
  • Docs
  • CSS
  • HTML
  • JavaScript

*you can click on any two elements below to swap their position

red
purple
green
orange
blue

backward | forward | reverse | Sort [1,3,0,2,4] | Swap first and last child | Current order | rearrangeDOM

Current DOM order


				

Documentation References: