Skip to content

Instantly share code, notes, and snippets.

@bingeboy
Created February 13, 2014 05:55
Show Gist options
  • Save bingeboy/8970478 to your computer and use it in GitHub Desktop.
Save bingeboy/8970478 to your computer and use it in GitHub Desktop.
backtotop tablet
document.addEventListener("touchmove", ScrollStart, false);
document.addEventListener("scroll", Scroll, false);
document.addEventListener("touchcancel", Scroll, false);
function ScrollStart() {
//hide back to top button now if it exists
}
function Scroll() {
//show back to top button now if scroll far enough
}
@bingeboy
Copy link
Author

-webkit-animation: fadein 2s; /* Safari and Chrome */
   -moz-animation: fadein 2s; /* Firefox */
    -ms-animation: fadein 2s; /* Internet Explorer */
     -o-animation: fadein 2s; /* Opera */
        animation: fadein 2s;

}

@Keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}

/* Firefox */
@-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}

/* Safari and Chrome */
@-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}

/* Internet Explorer */
@-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​

@bingeboy
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment