[#369] add scroller
This commit is contained in:
parent
b42766beb4
commit
c4ddc0118d
|
@ -0,0 +1,13 @@
|
|||
# http://sitear.ru/material/sozdaem-knopku-naverh-scroll-to-top-na-jquery
|
||||
$(window).scroll ->
|
||||
if $(this).scrollTop() > 0
|
||||
$("#scroller").fadeIn()
|
||||
else
|
||||
$("#scroller").fadeOut()
|
||||
return
|
||||
|
||||
$("#scroller").click ->
|
||||
$("body,html").animate
|
||||
scrollTop: 0
|
||||
, 400
|
||||
false
|
|
@ -41,6 +41,7 @@
|
|||
//= require extra/highlight
|
||||
|
||||
//= require extra/pull
|
||||
//= require extra/scroller
|
||||
|
||||
//= require_self
|
||||
|
||||
|
|
|
@ -218,3 +218,10 @@ textarea.resize-vertical
|
|||
|
||||
.update-label, .update-status, .pointer
|
||||
cursor: pointer
|
||||
|
||||
#scroller
|
||||
position: fixed
|
||||
bottom: 30px
|
||||
left: 20px
|
||||
cursor: pointer
|
||||
display: none
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#scroller.fa.fa-arrow-circle-up.fa-2x.text-primary
|
|
@ -33,3 +33,5 @@ html
|
|||
== javascript_include_tag 'moment/ru.js', cache: 'moment'
|
||||
== javascript_include_tag 'angular-locale_ru-ru', cache: 'angular-locale'
|
||||
== yield :additional_scripts if content_for?(:additional_scripts)
|
||||
|
||||
== render '/layouts/scroller'
|
||||
|
|
Loading…
Reference in New Issue