You have to use some Javascript Code and maybe set some states as data attributes,
if you want manipulate your DOM elements without refreshing the whole site.
If you wanna use JQuery (I prefer) take a look at this:
And add a attribute to your buttons like:
data-state="1"