Рипал: Бармен
[tealtable]Ссылка на скачивание![/tealtable]
Вставляем в Нижнюю часть сайта в самый низ:
Код
<a href="#" class="scrollup" style="display: inline;"></a>
CSS:
Код
.scrollup {
width: 140px;
height: 151px;
position: fixed;
bottom: 2%;
right: 1%;
display: none;
text-indent: -9999px;
background: url(/img/sctop.png) no-repeat;
z-index: 21;
}
JS (в нижнюю часть сайта):
Код
<script type="text/javascript">
$(document).ready(function() {
$(window).scroll(function() {
if ($(this).scrollTop() > 800) {
$('.scrollup').fadeIn();
} else {
$('.scrollup').fadeOut();
}
});
$('.scrollup').click(function() {
$("html, body").animate({
scrollTop: 0
}, 600);
return false;
});
});
</script>