Maybe jQuery, maybe not, but how do i do so like when you click on a link eg. FAQ it goes to the FAQ div box? I mean if its on the bottom then you just click on that link and then it goes to it..
Wikipedia have it.. http://en.wikipedia.org/wiki/USA The links in the "Contents".. when you click you get to it..
That's not Javascript, those are anchor links. See: http://www.w3.org/TR/html401/struct/links.html
Basically, you'd link as such:
<a href="#FAQ">FAQ</a>
Then above the content you're linking to:
<a name="FAQ" />
Alternatively, you could use the same link and set the ID of the FAQ section header to "FAQ", like so:
<h1 id="FAQ">FAQs</h1>
First, add an id to the HTML element. This will serve as the anchor.
For example:
id="mybox"
Now simply add a link to #mybox on that page. E.g. example.com/index.html#mybox
<a href="#mybox">Box</a>
As mentioned these are not anything to do with javascript; it is not required for this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With