Skip to content

Instantly share code, notes, and snippets.

@keithgreer
Last active November 23, 2022 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithgreer/5ab7d2606c78b67b779caf16907ab059 to your computer and use it in GitHub Desktop.
Save keithgreer/5ab7d2606c78b67b779caf16907ab059 to your computer and use it in GitHub Desktop.
.eucookie-pop-up { display:none; position:fixed; z-index:9999; bottom:0; left:0; right:0; background:#dc143c; color:#fff; margin:1em; padding:0.5em; text-align:center; }
.eucookie-pop-up .dismiss { float:right; width:7% text-align:center; padding-top:1em; }
.eucookie-pop-up .dismiss a { color:#fff; cursor:pointer; font-weight:bold; font-size:150%; padding:1em; }
.eucookie-pop-up .content { float:left; width:92%; text-align:center; }
.eucookie-pop-up .content a { text-decoration: underline;color:#fff }
<div id="privacy-pop-up" class="eucookie-pop-up">
<div class="dismiss">
<a id="exit-popup">X</a>
</div>
<div class="content">
<strong>Important information regarding cookies</strong><br>
By using this website, you consent to the use of cookies in accordance with our
<a href="https://example.com/privacy-policy-cookies">Privacy Policy</a>.
</div>
</div>
jQuery(document).ready(function() {
if(localStorage.getItem('eucookie') != '123'){
jQuery("#privacy-pop-up").delay(1).fadeIn(1000);
localStorage.setItem('eucookie','123');
}
jQuery('#exit-popup').click(function(e) {
jQuery('#privacy-pop-up').fadeOut(1000);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment