@@ -16,13 +16,13 @@ Usage
1616-----
1717
1818### Entering Fullscreen mode
19-
19+
2020You can either switch the whole page or a single HTML element to fullscreen
2121mode:
22-
22+ ``` js
2323 $ (document ).fullScreen (true );
2424 $ (" #myVideo" ).fullScreen (true );
25-
25+ ```
2626This only works when the code was triggered by a user interaction (For
2727example a onclick event on a button). Browsers don't allow entering
2828fullscreen mode without user interaction.
@@ -33,10 +33,10 @@ fullscreen mode without user interaction.
3333Fullscreen mode is always exited via the document but this plugin allows
3434it also via any HTML element. The owner document of the selected HTML
3535element is used then:
36-
36+ ``` js
3737 $ (document ).fullScreen (false );
3838 $ (" #myVideo" ).fullScreen (false );
39-
39+ ```
4040
4141### Querying Fullscreen mode
4242
@@ -46,41 +46,41 @@ browser doesn't support this) when fullscreen mode is active, `false` if not
4646active or ` null ` when the browser does not support fullscreen mode at all.
4747So you can use this method also to display a fullscreen button only when the
4848browser supports fullscreen mode:
49-
49+ ``` js
5050 $ (" #fullscreenButton" ).toggle ($ (document ).fullScreen () != null ))
51-
51+ ```
5252
5353### Toggling Fullscreen mode
5454
5555The plugin provides another method for simple fullscreen mode toggling:
56-
56+ ``` js
5757 $ (document ).toggleFullScreen ();
58-
58+ ```
5959
6060### Notifications
6161
6262The plugin triggers a ` fullscreenchange ` event on the document when the
6363fullscreen mode has been changed. If the browser rejected a fullscreen
6464state change then the plugin triggers a ` fullscreenerror ` event on the
6565document. Example:
66-
66+ ``` js
6767 $ (document ).bind (" fullscreenchange" , function () {
6868 console .log (" Fullscreen " + ($ (document ).fullScreen () ? " on" : " off" ));
6969 });
7070
7171 $ (document ).bind (" fullscreenerror" , function () {
7272 alert (" Browser rejected fullscreen change" );
7373 });
74-
74+ ```
7575
7676### Fullscreen iframe
7777
7878Entering fullscreen mode from within an iframe is not allowed by default but
7979it can be enabled with a few attributes on the iframe:
80-
80+ ``` html
8181 <iframe src =" iframe.html" webkitAllowFullScreen mozAllowFullScreen allowFullScreen >
8282 </iframe >
83-
83+ ```
8484### Known issues
8585
8686* In IE 11 an empty page is displayed when entering fullscreen from within an
0 commit comments