button toggling works
This commit is contained in:
parent
e6e2f42f86
commit
7afe8b2665
2 changed files with 25 additions and 2 deletions
|
|
@ -22,3 +22,19 @@ buttonStartCreateOffer.addEventListener('click', () => {
|
|||
closeOfferControls.addEventListener('click', () => {
|
||||
toggleCreateOfferControls();
|
||||
});
|
||||
|
||||
function toggleBuyOrSellButtonGroup() {
|
||||
buyOrSellButtons.forEach((button) => {
|
||||
if (button.classList.contains('selected')) {
|
||||
button.classList.remove('selected');
|
||||
} else {
|
||||
button.classList.add('selected');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buyOrSellButtons.forEach((button) => {
|
||||
button.addEventListener('click', () => {
|
||||
toggleBuyOrSellButtonGroup();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue