16
Разработка / Кнопка плавной прокрутки наверх, лего 6
« : Ноября 13, 2012, 02:42:06 am »Скачать архив
файл up.js положить в ваш_сайт/css/ваша_тема/javascript
Картинку стрелки arrows2.png положить в ваш_сайт/css/ваша_тема/images
В ваш_сайт/css/ваша_тема/theme/head.tpl.html вниз, перед </head> дописать
<script type="text/javascript" src="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/javascript/up.js"></script>
В вваш_сайт/css/ваша_тема/stylesheet/stylesheet.css добавить код
.scrollTop{
background:url(../../images/page/arrows2.png) 0 0 no-repeat;
display:block; width:50px; height:50px;
position:fixed; bottom:10px; left:47%;
z-index:2000;
}
.scrollTop:hover{ background-position:0 -58px; }
В ваш_сайт/css/ваша_тема/theme/index.tpl.html вниз, перед </body> добавить код
<a id="gotop" class="scrollTop" href="#" onclick="top.goTop(); return false;"></a>
Пример работы http://tvoyakrasota.com/
[вложение удалено администратором]