Skip to content

Instantly share code, notes, and snippets.

@levenokk
levenokk / style.scss
Created January 19, 2020 17:11
style for arrow up
.up-arrow {
position: fixed;
background-color: $darkGray;
width: 60px;
height: 60px;
text-align: center;
font-size: 24px;
color: #fff;
line-height: 60px;
-webkit-transition: all 0.2s linear;
@levenokk
levenokk / main.js
Created January 19, 2020 17:10
script for arrow up
$(window).on('scroll', function () {
if ($(this).scrollTop() > $(this).height()) {
$('.up-arrow').addClass('active');
} else {
$('.up-arrow').removeClass('active');
}
})
$('.up-arrow').on('click', function () {
@levenokk
levenokk / index.html
Created January 19, 2020 17:09
arrow up
<div class="up-arrow">
<i class="fas fa-angle-double-up"></i>
</div>