Skip to content
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

Making an extended floating action button #6641

Open
elloworl opened this issue May 10, 2021 · 1 comment
Open

Making an extended floating action button #6641

elloworl opened this issue May 10, 2021 · 1 comment

Comments

@elloworl
Copy link

Feature Request

Hi! I was wanting to make an extended floating action button that expands/contracts on scroll
image
Here is my code so far:

var prevScrollpos = window.pageYOffset;
window.onscroll = function() {
  var currentScrollPos = window.pageYOffset;
  if (prevScrollpos > currentScrollPos) {
    document.getElementById("FLOATING_ACTION_BUTTON").style.transform = "scale(1)";
  } else {
    document.getElementById("FLOATING_ACTION_BUTTON").style.transform = "scale(0)";
  }
  prevScrollpos = currentScrollPos;
}

Additional Information

This is automatically mined by FRMiner2.0 from Gitter.
ManuTheCoder @manuthecoder posted to Room Dogfalo/materialize on Mar 02 18:53 (UTC+8).

@elloworl
Copy link
Author

Our work aims to mine useful information from live chats, and let the team be aware of them. Hopefully this can help somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant