All Projects → code-lts → Jquery Fullscreen Plugin

code-lts / Jquery Fullscreen Plugin

Licence: mit
This jQuery plugin provides a simple to use mechanism to control the new fullscreen mode of modern browsers

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jquery Fullscreen Plugin

Jquery Tablesort
A tiny & dead-simple jQuery plugin for sortable tables.
Stars: ✭ 254 (-22.32%)
Mutual labels:  jquery-plugin, jquery
Preloadme
PreLoadMe, a lightweight jQuery website preloader.
Stars: ✭ 272 (-16.82%)
Mutual labels:  jquery-plugin, jquery
Email Autocomplete
A jQuery plugin that suggests and autocompletes the domain in email fields.
Stars: ✭ 265 (-18.96%)
Mutual labels:  jquery-plugin, jquery
Ajax Live Search
AJAX Live Search is a PHP search form that similar to Google Autocomplete feature displays the result as you type.
Stars: ✭ 238 (-27.22%)
Mutual labels:  jquery-plugin, jquery
Texttailor.js
jQuery plugin, tailor made text to fill the height of the parent element or ellipse it if it doesn't fit
Stars: ✭ 291 (-11.01%)
Mutual labels:  jquery-plugin, jquery
Ziptastic Jquery Plugin
This is a jQuery plugin that shows how Ziptastic could be used.
Stars: ✭ 244 (-25.38%)
Mutual labels:  jquery-plugin, jquery
Js Offcanvas
A lightweight, flexible jQuery off-canvas navigation plugin which lets you create fully accessible sidebar or top/bottom sliding (or push) panels with keyboard interactions and ARIA attributes.
Stars: ✭ 272 (-16.82%)
Mutual labels:  jquery-plugin, jquery
Magnify
A lightweight jQuery magnifying glass zoom plugin.
Stars: ✭ 218 (-33.33%)
Mutual labels:  jquery-plugin, jquery
Stickystack.js
A jQuery plugin that creates a stacking effect by sticking panels as they reach the top of the viewport.
Stars: ✭ 287 (-12.23%)
Mutual labels:  jquery-plugin, jquery
Sticky Kit
A jQuery plugin for creating smart sticky elements
Stars: ✭ 2,961 (+805.5%)
Mutual labels:  jquery-plugin, jquery
Jquery Viewer
A jQuery plugin wrapper for Viewer.js.
Stars: ✭ 235 (-28.13%)
Mutual labels:  jquery-plugin, jquery
Tweetie
Simple jQuery Twitter feed plugin
Stars: ✭ 314 (-3.98%)
Mutual labels:  jquery-plugin, jquery
Liteaccordion
A lightweight horizontal accordion plugin for jQuery.
Stars: ✭ 234 (-28.44%)
Mutual labels:  jquery-plugin, jquery
Modaal
An accessible dialog window library for all humans.
Stars: ✭ 2,702 (+726.3%)
Mutual labels:  jquery-plugin, jquery
Jquery Multiselect
Turn a multiselect list into a nice and easy to use list with checkboxes.
Stars: ✭ 221 (-32.42%)
Mutual labels:  jquery-plugin, jquery
Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: ✭ 271 (-17.13%)
Mutual labels:  jquery-plugin, jquery
Bootstrap Checkbox
A checkbox component based on Bootstrap framework.
Stars: ✭ 214 (-34.56%)
Mutual labels:  jquery-plugin, jquery
Percircle
⭕️ CSS percentage circle built with jQuery
Stars: ✭ 217 (-33.64%)
Mutual labels:  jquery-plugin, jquery
Sidr
Sidr is a jQuery plugin for creating side menus and the easiest way for doing your menu responsive.
Stars: ✭ 2,924 (+794.19%)
Mutual labels:  jquery-plugin, jquery
Jquery Loading
Easily add and manipulate loading states of any element on the page.
Stars: ✭ 321 (-1.83%)
Mutual labels:  jquery-plugin, jquery

jQuery Fullscreen Plugin

npm version

CDNJS

Description

This jQuery plugin provides a simple to use mechanism to control the new fullscreen mode of modern browsers. Currently only newer Webkit-based browsers (Like Chrome and Safari), Firefox and IE11+ provide this new fullscreen feature.

Usage

Entering Fullscreen mode

You can either switch the whole page or a single HTML element to fullscreen mode:

    $(document).fullScreen(true);
    $("#myVideo").fullScreen(true);

This only works when the code was triggered by a user interaction (For example a onclick event on a button). Browsers don't allow entering fullscreen mode without user interaction.

Exiting Fullscreen mode

Fullscreen mode is always exited via the document but this plugin allows it also via any HTML element. The owner document of the selected HTML element is used then:

    $(document).fullScreen(false);
    $("#myVideo").fullScreen(false);

Querying Fullscreen mode

Simply pass no argument to the fullScreen method to query the current state. The method returns the current fullscreen element (or true if browser doesn't support this) when fullscreen mode is active, false if not active or null when the browser does not support fullscreen mode at all. So you can use this method also to display a fullscreen button only when the browser supports fullscreen mode:

    $("#fullscreenButton").toggle($(document).fullScreen() != null))

Toggling Fullscreen mode

The plugin provides another method for simple fullscreen mode toggling:

    $(document).toggleFullScreen();

Notifications

The plugin triggers a fullscreenchange event on the document when the fullscreen mode has been changed. If the browser rejected a fullscreen state change then the plugin triggers a fullscreenerror event on the document. Example:

    $(document).bind("fullscreenchange", function() {
        console.log("Fullscreen " + ($(document).fullScreen() ? "on" : "off"));
    });

    $(document).bind("fullscreenerror", function() {
        alert("Browser rejected fullscreen change");
    });

Fullscreen iframe

Entering fullscreen mode from within an iframe is not allowed by default but it can be enabled with a few attributes on the iframe:

    <iframe src="iframe.html" webkitAllowFullScreen mozAllowFullScreen allowFullScreen>
    </iframe>

Known issues

  • In IE 11 an empty page is displayed when entering fullscreen from within an iframe. No idea why. Any help is welcome.
  • In Safari (At least in Safari 7) no keyboard input is allowed in fullscreen mode.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].