Add transition buttons and handling js