- Skill level:
Other People Are Reading
Unzip the "anchor.zip" file and move the "js" folder to the root directory of your website.
Create a link with a target of "#anchor1" and a class of "anchorLink." When this link is clicked, the page will scroll to the designated anchor. See the Tips section for an example of the code required for this step.
Create an anchor where you want the page to scroll to. Name the anchor "anchor1" and give an ID of "anchorTarget." See the Tips section for an example of the code required for this step.
Save the website to keep the changes, then open the page with a browser to confirm the scroll functions properly.
Tips and warnings
- An anchor link should look like "Click here to scroll down"
- An anchor should look like " "
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for