Show modal on load only once
<p>I have a page that shows a modal dialog onload. There's a checkbox that user needs to check and submit (think Terms of Use) before the modal is dismissed. Once that happens the page can be reloaded again, but the dialog box should never come back. Originally I thought of using PHP session but I want to dismiss the dialog box with JS (jQuery) without reloading the page. What is an alternative? Can I use cookies for the duration of the session?</p>

<p>My current code looks like this:</p>

<p>JS:</p>

<pre><code>$(document).delegate('#myButton', 'click', function() {

     if ($('input[name="myCheckbox"]').is(':checked')) {
        $('#myDialog').remove();
    }
});
</code></pre>

<p>HTML:</p>

<pre><code>&lt;div id="myDialog"&gt;
   text
   &lt;input type="checkbox" name="myCheckbox"&gt; &lt;input id="myButton" type="button" value="click me"&gt;
&lt;/div&gt;  
</code></pre>
