Table buttons js swap