Skip to content

Instantly share code, notes, and snippets.

@ksk1015
Created July 13, 2017 00:57
Show Gist options
  • Save ksk1015/f7178e9f61ebb320387b4faee6754355 to your computer and use it in GitHub Desktop.
Save ksk1015/f7178e9f61ebb320387b4faee6754355 to your computer and use it in GitHub Desktop.
detect support sticky
var supportSticky = (function(){
var el = document.createElement('div');
el.style.position = 'sticky';
if (el.style.position === 'sticky') {
return true;
}
el.style.position = '-webkit-sticky';
if (el.style.position === '-webkit-sticky') {
return true;
}
return false;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment