[#369] fix scroller

This commit is contained in:
Alexander Machehin 2014-12-25 19:45:11 +05:00
parent 3f7457e278
commit 7d600170a3
3 changed files with 16 additions and 13 deletions

View File

@ -1,13 +1,16 @@
# http://sitear.ru/material/sozdaem-knopku-naverh-scroll-to-top-na-jquery
$(window).scroll ->
if $(this).scrollTop() > 0
$("#scroller").fadeIn()
else
$("#scroller").fadeOut()
return
$(document).ready ->
$(window).scroll ->
if $(this).scrollTop() > 0
$("#scroller").fadeIn()
else
$("#scroller").fadeOut()
return
$("#scroller").click ->
$("body,html").animate
scrollTop: 0
, 400
false
$("#scroller").click ->
$("body,html").animate
scrollTop: 0
, 400
false
return

View File

@ -221,7 +221,7 @@ textarea.resize-vertical
#scroller
position: fixed
bottom: 30px
bottom: 20px
left: 20px
cursor: pointer
display: none

View File

@ -1 +1 @@
#scroller.fa.fa-arrow-circle-up.fa-2x.text-primary
#scroller.fa.fa-arrow-circle-up.fa-2x.text-primary.hidden-xs