title: Hide class if locally stored?
body: <p>I have a wordpress site and have a message showing on every page load. When button (.ig_close) is clicked I want the message not to show anymore after page refresh.</p>
  
  <pre><code>// html
  &lt;div class="icegram action_bar_135"&gt;
      &lt;div id="icegram_message_135"&gt;
          &lt;div class="ig_content"&gt;
              &lt;div id="ig_close_135" class="ig_close"&gt;
                  &lt;span&gt;&lt;/span&gt;
              &lt;/div&gt;
              &lt;div class="ig_data ig_clear_fix"&gt;
                  &lt;div class="ig_message"&gt;Text&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  // js
  // click button and store locally
  jQuery('.ig_close').click(function(){
  
          localStorage.setItem('saved', true);
          alert('You saved it!');
  
  });
  
  // if saved locally, hide .icegram
  jQuery( document ).ready(function() {
  
       if (localStorage.getItem('saved')) {
          alert('its saved!');
          jQuery('.icegram').hide();
          }
  
   });
  </code></pre>
  
  <p>It's telling me it's locally stored but wont hide my class, why?</p>