fantazer
8/7/2017 - 4:33 PM

scroll top --self

scroll top

.scroll-up
	+below(768px)
		size 40px
	flex(mid)
	round()
	cp()
	tr(all)
	position: fixed
	z-index 15
	bottom 5%
	right 5%
	border 1px solid $border-color
	size 64px
	opacity 0
	background: white
	&:hover
		background: black
		.icon
			fill white
	.icon
		+below(768px)
			size 15px
		size 30px
		fill black

.scroll-up--show
	opacity 1
.scroll-up
	+icon("arrow-up","icon")
//arrow scroll
	var scrollTop = 750;
	$(window).scroll(function() {
		var scroll = $(this).scrollTop();
		if ( scroll >= scrollTop ) {
				//var heightHeader=$('.header-main-wrap').height();
				$('.scroll-up').addClass('scroll-up--show');
			}
			else {
					$('.scroll-up').removeClass('scroll-up--show');
			}
	});

	$('.scroll-up').click(function() {
    $('html, body').animate({scrollTop: 0},800);
    return false;
  });
	//arrow scroll end