Call
608.845.2900
Visit
330 Locust Dr.
Verona, WI 53593
Message
info@powderkegwebdesign.com
Powderkeg Web Design
Menu
Message Us
Nick
Nick

Let there be Light – Lity Lightbox

February 10, 2017

A lot of our sites require some lightbox functionality. I prefer to use Jan Sorgalla’s Lity. It is fast, responsive, and works right out of the box. You can read up on the specific uses on his site, but the general gist of it is super simple:

Let’s say we want to have a link that opens a lightbox with a YouTube video in it.

  1. Link the Lity CSS and Javascript files ( requires jQuery )
  2. Add a link to a piece of text, button, image, etc with the href of the YouTube URL:
  3. Simply add a “data-lity” parameter to the anchor tag:

That’s it! Clicking on the link should show a size transition leading to a lightbox that plays your video:

You can also link to images, google maps, inline content, and other website urls. Illuminating.

Nick
Nick
Lead Developer

Nick is an ambitious and versatile developer with a wide range of talents. He is an efficient coder that utilizes his resources in order to achieve both his and the clients’ goals. His Alma Mater is the University of Wisconsin – Stevens Point where he graduated with honors in Web and Digital Media Development.