I am trying to switch the browser to full screen on document load. Among the various plugins available I tried to work with this. The API suggests that full screen mode can be entered like $(document).fullScreen(true);
The API works correctly on a button click. However, if I try to trigger the click via jQuery, it fails.
$(document).ready(function(){
$('#wow').click(function(){
$(document).fullScreen(true);
});
$('#wow').trigger('click');
})
Tried to just do a $(document).fullScreen(true);
on document.ready, it still fails.
Both actually fail with a Full screen error.
Triggering the button manually works!
The example code provided has code like these:
<button onclick="$(document).fullScreen(true)">Enter Fullscreen mode (Document)</button>
They work on manual clicks.
I am unable to understand why the same code fails to work if the event is fired programmatically.
Please advice.
EDIT:
I saw this link, which suggests that programmatic switching is "denied" [if i got it right]. So, is there any work-around for this?