FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


links on same page script - cant find one :(





Daisie
Where could I find a wee script that would allow to link stuff on the same page?

ex: you have a list of word/questions/titles, click on it and it bring you to the begining of the paragraph within the same page...

The only thing that I could find was
http://www.kryogenix.org/code/browser/smoothscroll/ that one, but I cant get it to work!

please help, thanks in advance Smile
MrBlueSky
You don't need a script to do that. I don't know if you want to use a fancy script, but you could just use normal links with the #-symbol. See this example:

Code:

<p>
<a href="#C4">See also Chapter 4.</a>
</p>

<h2>Chapter 1</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 2</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 3</h2>
<p>This chapter explains ba bla bla</p>

<h2><a name="C4">Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>


Clicking on "See also Chapter 4" will bring you to Chapter 4. This example is from w3schools. See it in action here: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_link_locations
Daisie
It's exactly what I wanted!
thanks for you help, it's very apreciated.

Edited: All done! work like a charm and very easy to install Very Happy
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.