Skip to content

Instantly share code, notes, and snippets.

View beanlee's full-sized avatar
🎯
Focusing

Bean Lee beanlee

🎯
Focusing
View GitHub Profile
@beanlee
beanlee / BackToTop.js
Last active August 29, 2015 14:05 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
$(function() {
$(window).scroll(function() {
if($(this).scrollTop() !== 0) {
$("#toTop").fadeIn();
} else {
$("#toTop").fadeOut();
}
});
$("body").append("<div id=\"toTop\" style=\"border:1px solid #444;background:#333;color:#fff;text-align:center;padding:10px 13px 7px 13px;position:fixed;bottom:10px;right:10px;cursor:pointer;display:none;font-family:verdana;font-size:22px;\">^</div>");
$("#toTop").click(function() {
@beanlee
beanlee / 0_reuse_code.js
Created August 20, 2014 10:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console