@SvitlanaSuslenkova
Posted
it's better to have onClick events for button. Like <button> here img or background for button </button>. After that you should select buttons(const buttons =document.querySelectorAll(".classofbutton");) and add forEach function or a loop for them. Then use something like: let text = this.previousElementSibling; then add styles for text.