Scroll-to-top button not showing in logged out mode

User avatar
Nauru Dolan
Ninja
Posts: 13064
Joined: Sep 17, 2015

Scroll-to-top button not showing in logged out mode

Post by Dolan »

Why is this element set to invisible when you visit the site without being logged in?

Code: Select all

<a href="#top" class="Scroll-to-top" title="Scroll to the top">
   <i class="Scroll-to-top__icon fa fa-rotate-270 fa-play-circle"></i>
</a>


Code: Select all

.Scroll-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
    display: block;
    color: rgba(38,30,24,.8);
    font-size: 36px;
    text-decoration: none;
    opacity: 0;
    -webkit-transition: all .2s ease-in;
    transition: all .2s ease-in;
}


And when you log in, some JS adds this class:

Code: Select all

.Scroll-to-top.is-visible {
    opacity: .75;
}


It seems to be happening because the script from http://eso-community.net/dist/javascript/index.js only runs for logged in users, so the class is not added if you're not logged in. This isn't getting executed while logged out:

Code: Select all

document.addEventListener("scroll",function(){window.scrollY>=200&&!e[0].classList.contains("is-visible")?e[0].classList.add("is-visible"):window.scrollY<200&&e[0].classList.remove("is-visible")


Or maybe you should set opacity to .75 on the basic selector.
User avatar
Netherlands edeholland
ESOC Community Team
Donator 01
Posts: 5033
Joined: Feb 11, 2015
ESO: edeholland
GameRanger ID: 4053888
Clan: ESOC

Re: Scroll-to-top button not showing in logged out mode

Post by edeholland »

I have no idea, but your avatar is very relevant.

@eaglemut @buckethead @ashvin @91 @_niceking_ @musketeer925 @tilanus
User avatar
Brazil Buckethead
Retired Contributor
Posts: 448
Joined: Mar 1, 2015

Re: Scroll-to-top button not showing in logged out mode

Post by Buckethead »

Fixed.

Who is online

Users browsing this forum: No registered users and 7 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV