<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Scroll to Bottom or Top - DevCurry.com</title>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js">
</script>
<script type="text/javascript" language="javascript">
$(function () {
$('#scrlBotm').click(function () {
$('html, body').animate({
scrollTop: $(document).height()
},
1500);
return false;
});
$('#scrlTop').click(function () {
$('html, body').animate({
scrollTop: '0px'
},
1500);
return false;
});
});
</script>
</head>
<body>
<a id="scrlBotm" href="#">Scroll to Bottom</a>
<div style="height:1000px"></div>
<a id="scrlTop" href="#">Scroll to Top</a>
</body>
</html>
//-------------second exp
<!DOCTYPE html>
<html>
<body>
<p>
<a href="#C4">See also Chapter 3</a>
</p>
<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><a name="C4">Chapter 3</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 5</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 6</h2>
No comments:
Post a Comment