We have a div with id my_header, a list ul with id my_list and a button with id show. We apply the following:
- We select the button with id show, when we click with the function click through the button with id show a function that adds the classes set-deg1 and set-deg2 to the div with id my_header is generated.
- When loading the page we select the list with id my_list and we add to each element li the classes set-deg followed by the index number, that is to say, 0, 1,....