create button to cancel fullscreen function

1

I want to create a button to cancel a fullscreen function / event without toogle function just click the button and close the full screen mode.

Can anyone help me?

    
asked by anonymous 16.01.2018 / 04:13

1 answer

0

I was able to resolve my issue with JavaScript

Solution:

   <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script><script>functionexitFullscreen(){if(document.exitFullscreen){document.exitFullscreen();}elseif(document.mozCancelFullScreen){document.mozCancelFullScreen();}elseif(document.webkitExitFullscreen){document.webkitExitFullscreen();}}</script>html:<buttonclass="fechar" onclick="exitFullscreen();"> X </button>
    
16.01.2018 / 05:28