I have cookie notice on my corporate website, which announces to new users that we are using cookies, however if the visitor presses a button, the dialog does not close and keeps showing to them. My html for cookie notice
<div id="cookie-warning">
<img src="https://d32exi8v9av3ux.cloudfront.net/web/2018/05/17/37b039b/website/common/img/ic_cookie.svg">
<p>We are using cookies to provide statistics that help us give you the best experience of our site. You can find out more by visiting our <a href="/cookies/">cookie policy</a>.<br>By continuing to use the site, you are agreeing to our use of cookies.</p>
<a href="#" class="gotit">Got it</a>
</div>
<script type="text/javascript">
$("#cookie-warning .gotit").click(function (e) {
e.preventDefault();
$("#cookie-warning").remove();
$.cookie("accepted_cookies", "1", { "expires": 365, "path": "/" });
});
I guess the CSS doesn't really play any role here, so i won't include it. From my point of view, there seems to be everything OK, but just doesn't close, anybody could maybe lighten up some things for me?