1$(function() {
2 if (Cookies.get('RemoveCount') == 'true' && Cookies.get('RemoveCount') != 'undefined') {
3 $("#count").hide();
4 } else {
5 $("#count").show();
6 }
7}
8
1<html>
2<head>
3<script
4 src="https://code.jquery.com/jquery-3.1.1.min.js"
5 integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
6 crossorigin="anonymous"></script>
7<script src="../js.cookie.js"></script>
8</head>
9<body>
10 <button id='clckced'> removeCount</button>
11 <div id="RemoveCount">
12 This should be removed.
13 </div>
14 <script>
15 $(function(){
16 if (Cookies.get('RemoveCount') == 'true' && Cookies.get('RemoveCount') != 'undefined' ){
17 $("#RemoveCount").hide();
18 } else {
19 $("#RemoveCount").show();
20 }
21 $('#clckced').click(function(){
22 Cookies.set('RemoveCount', 'true');
23 $("#RemoveCount").hide();
24 })
25 });
26 </script>
27
28</body>
29</html>
30