aranat

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: full screen – F11 #18844
    aranat
    Customer

      I’m found it!

      HTML:

      <input type=”button” value=”click to toggle fullscreen” onclick=”toggleFullScreen()”>

      JavaScript:
      function toggleFullScreen() {
      if ((document.fullScreenElement && document.fullScreenElement !== null) ||
      (!document.mozFullScreen && !document.webkitIsFullScreen)) {
      if (document.documentElement.requestFullScreen) {
      document.documentElement.requestFullScreen();
      } else if (document.documentElement.mozRequestFullScreen) {
      document.documentElement.mozRequestFullScreen();
      } else if (document.documentElement.webkitRequestFullScreen) {
      document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
      }
      } else {
      if (document.cancelFullScreen) {
      document.cancelFullScreen();
      } else if (document.mozCancelFullScreen) {
      document.mozCancelFullScreen();
      } else if (document.webkitCancelFullScreen) {
      document.webkitCancelFullScreen();
      }
      }
      }

      in reply to: woocommerce (to Andykev and Eric) #18409
      aranat
      Customer

        Thanks Wes 馃檪

      Viewing 2 posts - 1 through 2 (of 2 total)