title: Set div to opacity 0 on clicking hyperlink
body: <p>I'm trying to hide the <code>cookies-banner-bloc</code> div when I click <code>Close this message</code>. Where am I going wrong?</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div class="cookies-banner-bloc"&gt;
      &lt;div class="cookies-banner-container"&gt;
          &lt;p&gt;We use cookies on this website.&lt;/p&gt;
          &lt;a class="cookies-close-button no-border"&gt;Close this Message&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;  
  </code></pre>
  
  <p><strong>CSS:</strong></p>
  
  <pre><code>.hide {
    opacity:0;
  }
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$( document ).ready(function() {
  
      if(getCookie("userclosedalert")=="true"){
            $(".cookies-banner-bloc").addClass('hide');
              removeClass = false;
      }
      $(".cookies-close-button").click(function () {
         document.cookie = "userclosedalert=true";
  
      });
  
  });
  </code></pre>
  
  <p>Demo:
  <a href="https://jsfiddle.net/28860gqj/" rel="nofollow noreferrer">https://jsfiddle.net/28860gqj/</a></p>