Making an extended floating action button
elloworl opened this issue · comments
elloworl commented
Feature Request
Hi! I was wanting to make an extended floating action button that expands/contracts on scroll
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 commented
Our work aims to mine useful information from live chats, and let the team be aware of them. Hopefully this can help somehow.