Remember jQuery hide or show state after page refresh
<pre><code>    $(document).ready(function(){
        $("#navibtnon").bind('click', function(){
            $('#navi').fadeIn("fast");
            $(window).unbind('resize');
        });
    });
    $(document).ready(function(){
        $('#navbtnoff').bind('click', function () {
            $('#navi').fadeOut("fast");
            $(window).bind('resize', ScreenSize);
        });
    });

function ScreenSize()  {
  windowsize = $(window).width();
    if (windowsize &lt; 1040) {
      $('#naviclosed').fadeIn("fast");
    }
    if (windowsize &gt;= 1040) {
    $('#naviclosed').fadeOut("fast"); 
    }
}
</code></pre>

<p>So how do I get make jQuery remember this setting on page refresh?
Update: I added the what ScreenSize() function does.</p>

<p>thanks</p>
