Search This Blog

Thursday, July 16, 2009

Autoscroll to A Point at Page Function - 16th July

Sometimes, in your site, you might want to shift the focus of the user towards a part in your site. Example application would be:- "To Top" button, "To End of Page", or a FAQ sort of page. So, instead of having the user scroll down all the way, a simple function can help in shifting the attention to the appropriate location.

First: Go to the point where you would like the attention to shift to. Highlight the particular word or title. The point is to add a tag: < a name="x" > y < /a >, where 'x' is the name for the "bookmark". Next create a hyperlink for another word that has the tag: < a href="#x" > z < /a >. What can be changed are the x, y and z.

Example here:-
Code for the word "Go Here" below:- < a href="#quad">Go Here< /a>
Link:- Go Here
And, code for the "Quad Ad Test" tile would be:- < a name="quad">Quad Ad Test< /a>


It would lead you to the Quad Ads I created a while back.

No comments: