JavaScript Fullscreen API plugin -
i've found plugin called screenfull.js , i'm wondering if it's possible automatically open page in fullscreen without clicking on button. example of code making page fullscreen :
document.getelementbyid('#button').addeventlistener('click', function() { if ( screenfull ) { screenfull.request(); } else { // ignore or else }
});
using demo, run request on window load:
e.g.
window.onload = function() { screenfull.request( $('#container')[0] ); };
[edit]
run jquery document ready...
e.g.
$(document).ready(function() { screenfull.request( $('#container')[0] ); });
Comments
Post a Comment