Skip to content

Instantly share code, notes, and snippets.

View ruisaraiva19's full-sized avatar
🏠
Working from home

Rui Saraiva ruisaraiva19

🏠
Working from home
View GitHub Profile
@ruisaraiva19
ruisaraiva19 / check-sticky-support.js
Created March 7, 2020 10:40
Check browser support for position sticky
function checkStickySupport() {
const el = document.createElement('a');
el.style.cssText =
'position:sticky; position:-webkit-sticky; position:-ms-sticky;';
return el.style.position.indexOf('sticky') !== -1;
}
const isStickySupported = checkStickySupport();
@ruisaraiva19
ruisaraiva19 / 0_reuse_code.js
Created March 11, 2017 17:44
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