need code so cookie can remember div open closed state jquery
<p>I need the code so system remember the state of the div if it is shown or hidden so it stays there after page refresh.</p>

<p>I have read all the  solutions  i could find but  i getting  no where, none the examples with small code fragments, fit in my code, or i am just doing something wrong </p>

<p>I have this code to show/hide the div</p>

<pre><code>&lt;script type="text/javascript" src="{INCURL}themes/{THEME}/js/jquery-1.7.2.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="{INCURL}themes/{THEME}/js/jquery.cookie.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;
    function HideContent(d) {
        document.getElementById('shownews').style.textDecoration = 'none';
        document.getElementById(d).style.display = "none";
    }
    function ShowContent(d) {
        document.getElementById(d).style.display = "block";
    }
    function ReverseDisplay(d) {
        if(document.getElementById(d).style.display == "none") { 
            document.getElementById(d).style.display = "block"; 
        } else { 
            document.getElementById(d).style.display = "none"; 
        }
    }
&lt;/script&gt;

&lt;a id="shownews" class="icons showhide" href="javascript:ReverseDisplay('news')"&gt;
&lt;div id="news" style="display:none;" class="infobox"&gt;{newsbox.TITLE}&lt;br&gt;{news.CONT}&lt;/div&gt;
</code></pre>

<p>It works fine just the cookie puzzle I cant solve.</p>
