title: How to Keep Cookie Value after page refresh
body: <p>I'm creating a demo panel for users to change the layout of a Wordpress theme when they arrive at my demo site.  The user changes value via a select drop-down box, and a cookie is set at that time.</p>
  
  <p>I'm having trouble showing the ACTIONS that I want implement after the page is refreshed.  So the cookie is saving it's value, but after page refresh my CSS actions will not stay in place.  I'm not very good with jQuery so any help would be appreciated.  Here's the code:</p>
  
  <pre><code>$('#montage-demo-panel select.body-style-layout').change(function () {
  
          // Apply cookie
          $.cookie('body-style-layout', $(this).val(), { path: '/' });
  
                      var value = $(this).val();
                      if (value == 'fixed') {
                      var wrapper = $('#wrapper');
                      var header = $('#header');
                      var masthead = $('#masthead');
                      var branding = $('#branding');
  
                      wrapper.removeAttr('style');
                      header.removeAttr('style');
                      masthead.removeAttr('style');
                      branding.removeAttr('style');
  
                      wrapper.removeClass('wrapper-full purple-header-full');
                      header.removeClass('header-full');
                      masthead.removeClass('masthead-full');
                      branding.removeClass('branding-full');
                      location.reload();
  
                     } else {
  
                      var wrapper = $('#wrapper');
                      var header = $('#header');
                      var masthead = $('#masthead');
                      var branding = $('#branding');
                      var mainbg = $('#main-bg');
                      var access = $('#access');
  
                      wrapper.removeClass('purple-header');
  
                      wrapper.addClass('wrapper-full purple-header-full');
                      header.addClass('header-full');
                      masthead.addClass('masthead-full');
                      branding.addClass('branding-full');
                      mainbg.addClass('main-bg-full');
                      access.addClass('access-full');
  
          // Re-fresh page
          location.reload();
                  }
      });
  </code></pre>