Giter VIP home page Giter VIP logo

glightbox's Introduction

GLightbox

Glightbox is a pure javascript lightbox. It can display images, iframes, inline content and videos with optional autoplay for youtube, vimeo and even self hosted videos with JWPlayer support

Demo

You can check the live demo right here

Usage

$ npm install glightbox
# OR
$ yarn add glightbox
# OR
$ bower install glightbox
import GLightbox from 'glightbox'

Or manually download and link glightbox.min.js in your HTML:

<link rel="stylesheet" href="dist/css/glightbox.css">
<script src="dist/js/glightbox.min.js"></script>

For more information please check the demo site.

Development

$ npm install
$ npx gulp watch
$ npx http-server .

Browser Support

GLightbox was tested in the following browsers.

  • Safari
  • Mobile Safari
  • Opera
  • Edge
  • Firefox
  • Internet Explorer 11

It will work in any browser that supports css Flexbox

Contributing

Feel free to report any issues! If you wish to contribute by fixing a bug or implementing a new feature, please first read the CONTRIBUTING guide.

Changelog

2.0.1

  • Fixed Mobile navigation
  • Fixed slide width for external sources

2.0.0

  • Fixed youtube, vimeo autoplay when changing slides
  • Fixed lightbox won't fit screen with description
  • Fixed Removed global body variable that was causing some problems
  • New: Delegated permissions to cross-origin iframes (for the new browsers autoplay restrictions)

1.0.9

  • Added svg to source types so it can be displayed as an image @tuomassalo
  • Added contributing file
  • Updated dependencies @tuomassalo.
  • Removed demo folder from npm

1.0.8

  • New: You can define each slide option in a different data attribute (data-title="example" data-description="...")
  • Fixed youtube and vimeo autoplay when opened for the first time
  • Fixed global slide params not working
  • Fixed some issues on IE11
  • Fixed using characters : or ; in slide description

1.0.7

  • New: Added reload method, useful when injecting content with ajax, cloning nodes, etc.
  • Fixed closeButton setting not removing the element
  • Fixed video not displayed on mobile devices

1.0.6

  • New: Now you can set individual width and height for each slide with inlines or iframes.
  • New: Now you can set individual source types for each slide ('type': 'image' | 'iframe' | 'video' | 'inline' | 'external).
  • New: Published on npm
  • New: Published on bower
  • Fixed afterSlideLoad only triggered one time for all the slides
  • Fixed a small space between the image and description when is set to top or bottom

1.0.5

  • New: Added none as a new option to disable open, close and slide animations
  • New: Added new options (touchNavigation, keyboardNavigation, closeOnOutsideClick) to enable or disable user interaction
  • Fixed open and close effect not taking a custom animation
  • Fixed an error when calling the destroy method and no videos were present in the slider

1.0.4

  • Improved the open method so it can be called without duplicating the structure and events
  • New: The original node is passed to events like beforeSlideChange, afterSlideChange, etc.

1.0.3

  • New: Added option moreLength to control the number of characters in the description for mobile devices

1.0.2

  • Fixed instance not returned and unable to call public methods

1.0.1

  • Fixed large images not displayed correctly

1.0.0

  • Initial release

Todo

  • Improve github description with more documentation and examples

License

This project is licensed under the MIT License - see the LICENSE.md file for details

glightbox's People

Contributors

biati-digital avatar tuomassalo avatar

Watchers

James Cloos 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.