
Originally Posted by
Dan1989
user clicks on a page and then simply page scrolls to particular id after it loads itself.
I interpret that to mean first page (html file) has a link to a second page (html file) that will scroll to the desired spot/place when it finishes loading..
That feature has been part of html for some time and does not need JavaScript.
Unless of course WP does not allow it, in that case ?
Here goes...........
Page One name it sumpin like *start.htm*
HTML Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>go to</title>
</head>
<body>
<p>A simple page scroll without javascript??????</p>
<p><a href="pageTwo.htm#two">New page and scroll to <b>Second</b> lot of paragraphs</a></p>
<p><a href="pageTwo.htm#three">New page and scroll to <b>Third</b> lot of paragraphs</a></p>
</body>
</html>
now the second htm file
Name it *pageTwo.htm*
NOTE: *htm* not *html* unless you change the *start.htm* file links to suit your name. IMPORTANT.
HTML Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Done</title>
</head>
<body>
<a name="top"></a>
<h1>You are at the top now..</h1><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p><p>some stuff 1</p>
<a name="two"></a>
<h2>Top of the second lot of paragraphs...</h2><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p><p>some stuff 2</p>
<a name="three"></a>
<h3>Top of the third lot of paragraphs...</h3><p>some stuff 3</p><p>Now scroll down to bottom</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p><p>some stuff 3</p>
<a href="#top">Go back to top of page from here</a>
<p>Is this feature what you are after</p>
<hr>
</body>
</html>
Bookmarks