At the moment the event listener is in the parent box of the column, I would like to add the event listener in the column and, when it was called, the class was added in the <p> tag of the box's sister.
I have a box with two others inside, divided along the line, but one of the inside boxes is growing more than the other, I don't know how to solve it without breaking the flexibility of the other break points.
Also, I'm underlining "learn more" with a :after, is there any way to make it stick with the sentence without having to change the placement at each breakpoint?
I'm having difficulty with some things.
First, I would like to save the input value on click, but I couldn't, so I did it with the num attribute in the function.
Also, I would like to display an alert for when the submit button is clicked without choosing a number. Initially the variable btn has the value undefined. I tried as follows: function onSubmit() {
if (btn == undefined){
alert('')
} else {
state1.style.display = 'none'
state2.style.display = 'flex'
}
}
But the function never enters the else, the value of btn changes to the value of num when the onRating function is called, but soon after it returns to the value undefined. I can't solve this, could someone help me? :(