Last active
June 18, 2020 19:23
-
-
Save johnlewisdesign/d20a5eade5039eda4e21355763f67e95 to your computer and use it in GitHub Desktop.
Set whether page has been visited or not yet via jQuery (COVID-19 banner show once)
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
$(document).ready(function() { | |
var yetVisited = localStorage['visited']; | |
if (!yetVisited) { | |
// open popup | |
localStorage['visited'] = "yes"; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment