title: how to check if page is loaded for the first time using javascript
body: <p>I want to check if the page is being loaded for the first time, and if it is then display the filter. If I put showFiltermenu() in the pageLoad function then it will show every time the page is loaded but I just want it display the first time. I tried using <code>Page.IsPostBack</code> but that doesn't display the filter.</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
          function showFiltermenu() {
              $("#filtermenuDrop").toggle('fold', {}, 500);
          }
          function closefiltermenu() {
              $("#filtermenuDrop").toggle('fold', {}, 500);
          }
  
  function pageLoad() {
          $("input[rel^='datepicker']").datepicker({
              dateFormat: 'dd/mm/yy',
              changeMonth: true,
              yearRange: "c-50:c+50",
              changeYear: true,
              showOn: "both",
              firstDay: 1,
              buttonImage: "../images/icons/buttons/basic1-049-small.png"
          });
          &lt;% if (Page.IsPostBack)
             { %&gt;
                  showFiltermenu();
          &lt;% } %&gt;
  
          ShadowboxInit();
  
      }
  </code></pre>