Hey Guys,
I just wanted some help on how I can use Javascript's onClick function to allow my visitors to be able to navigate to different paragraphs.
So, for example:
<html>
<head>
<title>Test</title>
</head>
<body>
<p>
<a href="#" onClick="?">Click here to go to Paragraph 1</a>
<a href="#" onClick="?">Click here to go to Paragraph 2</a>
<a href="#" onClick="?">Click here to go to Paragraph 3</a>
<a href="#" onClick="?">Click here to go to Paragraph 4</a>
<a href="#" onClick="?">Click here to go to Paragraph 5</a>
<p id="p1">Paragraph 1</p>
<p id="p2">Paragraph 2</p>
<p id="p3">Paragraph 3</p>
<p id="p4">Paragraph 4</p>
<p id="p5">Paragraph 5</p>
</body>
</html>
How could I make it that the links navigate the user to the paragraph? I'm researching into the GetElementByID - but am still developing my knowledge... I know they can easily scroll down - but the paragraphs will be large walls of text answering faqs!
All help is greatly appreciated. :)