I am working on Demo of bubble sort and other as well using pure Javascript (not jquery) using buttons . I need to swap buttons from current position to the location reqired. I am successful in sorting the numbers but unable to set animations as desired.
Bubble Sort

(The desired animation here would be to translate the numbered button with the maximum value to the right on each pass.And the minimum to the left. Until the numbers are displayed in completely sorted order.Used the word "desired" since animations would be different for other sorts.)