<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
Masukan script jQuery plugins berikut, mau dibawah script jQuery inti diatas, atau diatas tag </body>jQuery Plugins
<script type="text/javascript">
//<![CDATA[
$(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>
Cari kode ]]></b:skin> dan masukan kode CSS berikut diatasnya...//<![CDATA[
$(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>
#scrlBotm {
float: right;
font-size: 13px;
position: fixed;
top: 0;
right: 0;
color: red;
}
#scrlTop {
float: right;
font-size: 13px;
position: fixed;
right: 0;
bottom: 0;
color: red;
}
Setelah itu temukan kembali kode <body> masukin kode HTML-nyafloat: right;
font-size: 13px;
position: fixed;
top: 0;
right: 0;
color: red;
}
#scrlTop {
float: right;
font-size: 13px;
position: fixed;
right: 0;
bottom: 0;
color: red;
}
<a href="#" id="scrlBotm">Scroll to Bottom</a>
<a href="#" id="scrlTop">Scroll to Top</a>
Tidak ada komentar:
Posting Komentar