File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -69,3 +69,12 @@ document. Example:
6969 $(document).bind("fullscreenerror", function() {
7070 alert("Browser rejected fullscreen change");
7171 });
72+
73+
74+ ### Fullscreen iframe
75+
76+ Entering fullscreen mode from within an iframe is not allowed by default but
77+ it can be enabled with a few attributes on the iframe:
78+
79+ <iframe src="iframe.html" webkitAllowFullScreen mozAllowFullScreen allowFullScreen>
80+ </iframe>
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="UTF-8 " />
5+ < title > Test iframe</ title >
6+ < script type ="text/javascript " src ="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js "> </ script >
7+ < script type ="text/javascript " src ="../jquery.fullscreen-min.js "> </ script >
8+ </ head >
9+ < body style ="background:white ">
10+ < button onclick ="$(document).fullScreen(true) "> Enter Fullscreen mode from iframe</ button >
11+ < button onclick ="$(document).fullScreen(false) "> Exit Fullscreen mode</ button >
12+ </ body >
13+ </ html >
Original file line number Diff line number Diff line change @@ -42,12 +42,14 @@ <h1>jQuery Fullscreen Plugin demo</h1>
4242 < button onclick ="$(document).toggleFullScreen() "> Toggle Fullscreen mode (Document)</ button > < br />
4343 < button onclick ="alert($(document).fullScreen()) "> Query Fullscreen mode</ button >
4444 </ div >
45+ < iframe src ="iframe.html " width ="512 " height ="100 " webkitAllowFullScreen mozAllowFullScreen allowFullScreen >
46+ </ iframe >
4547 < p class ="fullscreen-supported ">
4648 Browser supports fullscreen mode.
4749 </ p >
4850 < p class ="fullscreen-not-supported ">
4951 Browser does not support fullscreen mode.
50- </ p >
52+ </ p >
5153 < p id ="status "> </ p >
5254
5355 </ body >
You can’t perform that action at this time.
0 commit comments