Shift buttons to the left or right based on user input

Hi there,
Not sure if this is possible but can I shift button elements to the left or right when a user choose one over the other?
Example: If a user select button 2, and then select button 1, button 2 will shift to the right so that button 1 can show. ( in order 1,2,3 ) if no button 1 is selected, but 2 will stay in place.

I hope this makes sense?

Yes, you can use the hide/show aspects of each of the elements. It won’t shift the elements but hide/show them in different locations of your page when a certain event is called like onClick, onHover, mouseOver, onFocus, etc.

Thanks for the information