title: javascript trigger fullscreen
body: <p>I tried to trigger fullscreen using javascript by clicking the button.</p>
  
  <pre><code>&lt;button id="fullscreen" onClick="fullscreen()"&gt;fullscreen&lt;/button&gt;
  &lt;script&gt;
      function fullscreen(){
          var element = document.documentElement;
          if (element.mozRequestFullScreen) {
              element.mozRequestFullScreen();
          } else if (element.webkitRequestFullScreen) {
              element.webkitRequestFullScreen();
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>it works.</p>
  
  <p>but I would like to trigger it automatically by adding</p>
  
  <pre><code>$(document).ready(function() {
      $("#fullscreen").click();
  });
  </code></pre>
  
  <p>then it doesn't work.
  can anyone help?</p>