title: How to set session variable in jquery?
body: <p>I have an html page that open a popup window when the page loads.</p>
  
  <p>I need  to set the popup only when the page open first time. I think session or cookie is to be set.</p>
  
  <pre><code>    &lt;script&gt;
          !window.jQuery &amp;&amp; document.write('&lt;script src="fancybox/jquery-1.4.3.min.js"&gt;&lt;\/script&gt;');
      &lt;/script&gt;
      &lt;script type="text/javascript" src="fancybox/jquery.fancybox-1.3.4.pack.js"&gt;&lt;/script&gt;       
      &lt;script type="text/javascript"&gt;
      $(document).ready(function() {  
          $("a#example1").fancybox();     
          $("a#example1").trigger('click');           
      });
  
      &lt;/script&gt;   
      &lt;link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css" media="screen" /&gt;  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;a id="example1" href="images/pic.jpg"&gt;&lt;/a&gt; 
  &lt;/body&gt;
  </code></pre>