0
Good morning guys, I’m creating this topic because I performed a forum search and found this solution here.
How to open a <div> by clicking on a <a link>?
But I need a more specific solution.
I am developing a quiz, for each question, I created a HELP tag This tag should display a div when clicked (until then, it’s all right)
Problem:
For each HELP tag I need to display specific content. That is, if the link is clicked on question one, the next div should be opened but with the specific content to help in question 1, if the link is clicked on question two, the content to be displayed should refer to question two.. and so on.
My solution:
I can create N Divs with an ID selector with the specific content for each tag . But I would like to simplify this process, something like: use a class to identify the div and compare which Link was clicked to display the specific element within that div, then I would use the same div always, only with the distinct content...
I think that’s it guys, I don’t know if it’s too clear.
Thank you for your attention
How is your code?
– Renan Gomes
Post what you already have.
– Kenny Rafael