Created
July 13, 2017 00:57
-
-
Save ksk1015/f7178e9f61ebb320387b4faee6754355 to your computer and use it in GitHub Desktop.
detect support sticky
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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