I am in need of creating a navigation system that can display or hide multiple divs depending on user interactions.
My requirements are as follows: When a user clicks on any of the "options", I want a class called "selected" to be applied to the chosen item in the navigation. This will involve adding the class to the anchor element. The CSS styling for the "selected" class is already defined in the example below.
Click here to see my current progress
Additionally, I am struggling with setting either "option 1" or "option 2" as selected by default when the page loads. This is necessary so that only one div appears initially, based on the correct "option" being "selected".
I am open to any suggestions or recommendations to help me accomplish this task!