<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Dynamically Button for Scrolling to Top Page</title>
<style>
body, html {
margin: 0 auto;
padding: 0;
text-align: center;
}
#cnt { height: 1234px; }
</style>
<link href="scrtop/scrolltop.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Dynamically Button for Scrolling to Top Page</h2>
<sup>From: <a href="http://coursesweb.net/javascript/" title="JavaScript / jQuery Course">JavaScript / jQuery Course</a></sup><br/><br/><br/>
JS script to add Dynamically a Button in web page to Scroll to Top. The button is displayed only when the user scrolls the page down, more than window height.<br/>
The button is removed when vertical scroll-bar position is less then browser's height.<br/><br/><br/>
• <b>Scroll the page down to see the result</b>.
<div id="cnt">...</div>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
Free courses, games and anime: <a href="http://www.marplo.net/">www.marplo.net</a><br/><br/>
<div id="sttop"></div>
<script type="text/javascript" src="scrtop/scrolltop.js"></script>
</body>
</html> |