Установка:
Ставим этот код перед </body>
Code
<style type="text/css">
element.style {
display: inline;
}
#toTop {
background-attachment: scroll;
background-clip: border-box;
background-color: rgb(102, 102, 102);
background-image: url("http://joomla.ucoz.com/Skriptidrugie/up.png");
background-origin: padding-box;
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: auto;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
bottom: 5px;
color: rgb(255, 255, 255);
cursor: pointer;
display: none;
height: 32px;
margin-bottom: 20px;
margin-left: 20px;
margin-right: 20px;
margin-top: 20px;
padding-bottom: 15px;
padding-left: 15px;
padding-right: 15px;
padding-top: 15px;
position: fixed;
right: 5px;
text-decoration: none;
width: 32px;
</style>
<a style="display: inline" id="toTop"/>
<script type="text/javascript">
<!--
$(function(){$.fn.scrollToTop=function(){$(this).hide().removeAttr
("href");if($(window).scrollTop()>="300"){$(this).fadeIn("slow")}var scrollDiv=$(this);$(window).scroll(function(){if($(window).scrollTop()<="300"){$(scrollDiv).fadeOut("slow")}else{$(scrollDiv).fadeIn("slow")}});$(this).click(function(){$("html, body").animate({scrollTop:0},"slow")})}});
$(function(){$("#toTop").scrollToTop();});
//-->
</script>
element.style {
display: inline;
}
#toTop {
background-attachment: scroll;
background-clip: border-box;
background-color: rgb(102, 102, 102);
background-image: url("http://joomla.ucoz.com/Skriptidrugie/up.png");
background-origin: padding-box;
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: auto;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
bottom: 5px;
color: rgb(255, 255, 255);
cursor: pointer;
display: none;
height: 32px;
margin-bottom: 20px;
margin-left: 20px;
margin-right: 20px;
margin-top: 20px;
padding-bottom: 15px;
padding-left: 15px;
padding-right: 15px;
padding-top: 15px;
position: fixed;
right: 5px;
text-decoration: none;
width: 32px;
</style>
<a style="display: inline" id="toTop"/>
<script type="text/javascript">
<!--
$(function(){$.fn.scrollToTop=function(){$(this).hide().removeAttr
("href");if($(window).scrollTop()>="300"){$(this).fadeIn("slow")}var scrollDiv=$(this);$(window).scroll(function(){if($(window).scrollTop()<="300"){$(scrollDiv).fadeOut("slow")}else{$(scrollDiv).fadeIn("slow")}});$(this).click(function(){$("html, body").animate({scrollTop:0},"slow")})}});
$(function(){$("#toTop").scrollToTop();});
//-->
</script>
Готово.
Другие новости |
Поделиться ссылкой
|