-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll top fix @publiclab #6944
Conversation
This hides the button when the user is at the top of the webpage but reveal the button when the user scrolls.
This consists of a function that hides the to-top button on the page and reveal it when the user scrolls
This is the same scroll-func.js file but with the indentations in a more orderly manner.
This looks good! @jywarren @SidharthBansal please merge it if you find it okay! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Hi all, is the scrollbar ever visible locally? I pulled the changes and could not see it...Thanks all |
Can we merge this @cesswairimu |
Yes we can |
Congrats on merging your first pull request! 🙌🎉⚡️ Help others take their first stepNow that you've merged your first pull request, you're the perfect person to help someone else out with this challenging first step. 🙌 Try looking at this list of `first-timers-only` issues, and see if someone else is waiting for feedback, or even stuck! 😕 People often get stuck at the same steps, so you might be able to help someone get unstuck, or help lead them to some documentation that'd help. Reach out and be encouraging and friendly! 😄 🎉 Read about how to help support another newcomer here, or find other ways to offer mutual support here. |
Thanks everyone |
Thanks all
…On Sat, 4 Jan 2020, 5:07 am Cess, ***@***.***> wrote:
Thanks everyone
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6944?email_source=notifications&email_token=AFAAEQZSWUSMRZQKHF75DY3Q37D4HA5CNFSM4JYLSDH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICKNQY#issuecomment-570730179>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAAEQZHHZS3KREBMUOZDW3Q37D4HANCNFSM4JYLSDHQ>
.
|
* Scroll button functionality This hides the button when the user is at the top of the webpage but reveal the button when the user scrolls. * public lab scroll-to-top #issue 6435 This consists of a function that hides the to-top button on the page and reveal it when the user scrolls * indent fixed This is the same scroll-func.js file but with the indentations in a more orderly manner.
* Scroll button functionality This hides the button when the user is at the top of the webpage but reveal the button when the user scrolls. * public lab scroll-to-top #issue 6435 This consists of a function that hides the to-top button on the page and reveal it when the user scrolls * indent fixed This is the same scroll-func.js file but with the indentations in a more orderly manner.
window.addEventListener("scroll", function(){ | ||
let position = window.scrollY; | ||
if(position < 200){ | ||
scrollBtn.style.opacity = "0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cesswairimu should not we use "visibility=hidden" instead of "opacity=0" as in this case we still are able to interact with the "scrollBtn"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frappelatte28 I thought the two are the same...but I am not the best at styling 😆 ...would you like to give it a shot and open a PR with the visibility option, see how it goes?
Fixes #6435 (<=== Add issue number here)
Please review or comment@publiclab
Thanks!