Hello friendly and knowledgeable web developers of D2JSP,
I am very experience with HTML/CSS, however I have just recently started picking up on PHP/JavaScript.
That being said, I'm pretty positive the solution for my current problem will come in the from of JavaScript, however other solutions are welcomed.
Currently, I have a "container div" which holds 6 "content divs".
Each "content div" has a different amount of content, all of which is text.
Each "content div" also has an internal link referencing it.
What happens is when I click one of the "content div" links, the "container div" scrolls to the appropriate "content div", good.
The problem is that some of the "content divs" contain very little content, so when I click the link corresponding to them some of the content from another "content div" is visible at the bottom of the "container div".
Hopefully all of that makes sense...
What I would like to implement is a JavaScript which affects the links for the "content divs". The way it would work is, when a link was clicked the JavaScript would change the style.display value for that div to "visible" and simultaneously set the style.display for ALL other "content divs" to "hidden".
This way the end-user sees only the content associated with the link they click.
Help with this script would be highly appreciated, as would input regarding other possible/better solutions.
Thanks!
-Grievance