Git Product home page Git Product logo

jquery-fullscreen's Introduction

jquery-fullscreen Build Status

jQuery wrapper for the JavaScript Fullscreen API

Usage

// Make an element go fullscreen
$element.enterFullscreen();

// Then take it out of fullscreen
$element.exitFullscreen();

Events you can listen for:

  • jq-fullscreen-change, triggered when the page enters fullscreen or exits fullscreen. The fullscreen property is also passed with the event; it is true if there is a fullscreen element, false if not. If fullscreen is true, element will also be available with the element that is currently fullscreen.
  • fullscreenerror, triggered when fullscreening is unsuccessful (note that this is also the browser standard for fullscreen errors; in this case it simply makes the vendor-specific events behave like the standard).

enterFullscreen and exitFullscreen can be called on any jQuery object; only the first element matched will be affected. The jq-fullscreened class is also added to elements while fullscreen. If you wish to check if an element is fullscreen, look for the isFullscreened data attribute (true when fullscreen). Both enterFullscreen and exitFullscreen are chainable.

$.support.fullscreen is true if fullscreen is supported (useful for conditionally displaying a fullscreen button, for example).

Note

Elements can only be made fullscreen based on user interaction (for example, clicking a button), to protect against malicious uses of the fullscreen functionality.

License

jquery.fullscreen is licensed under the GNU General Public License version 2. It incorporates code from multilightbox, which is also licensed under the GNU GPLv2.

jquery-fullscreen's People

Contributors

gi11es avatar krinkle avatar theopolisme avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.