Hey guys! I was just wondering if there is a jscript code to jump to the middle (or where my content is) of the page if i click on the link on the same page. if not how would you do it anyways?
Hey guys! I was just wondering if there is a jscript code to jump to the middle (or where my content is) of the page if i click on the link on the same page. if not how would you do it anyways?
use <a href="#name">click here</a>
To elaborate, what you want is a link anchor. Right beside the content you want users to jump to when a link is clicked on the same page, add an anchor:
Then, anywhere on your page, create a link that takes the user to the above when clicked on by doing:Code:<a name="#gohere"></a><p>My middle content here</p>
Code:<a href="#gohere">Jump to content</a>
I thought that one needed the # and the other didn't.
Isn't it:
<a name="anchor">
<a href="#anchor">?
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Yes djr33 is correct
Code:<a name="gohere"></a><p>My middle content here</p> . . . . . . . . . . . . . <a href="#gohere">Jump to content</a>
Though, I'm not sure, and maybe both are correct.
I'm assuming someone will be able to clear it up soon.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Ah yes technically the anchor itself shouldn't have the "#" prefix, though it seems with it doesn't change the behavior.
Bookmarks