3

is it possible to open a lightbox window which contains HTML content rather than just an image like in the demos?

The example listed:

<a href="img/image-1.jpg" data-lightbox="image-1" data-title="My caption">Image #1</a>

Will open the image image-1.jpg in a new lightbox window.

Is there a way using this plugin to do something like this:

<a href="#mycontent" data-lightbox="mycontent">View content</a>

<div id="mycontent">I am some content</div>

And then have the div mycontent be shown in the lightbox window when clicking the link?

dtsg
  • 4,408
  • 4
  • 30
  • 40
  • That plugin seems to only support images. You may need to use another one or make a custom script. – Spokey Oct 15 '14 at 09:47
  • [fancybox](http://fancyapps.com/fancybox/) is a good alternative that lets you open up content. Or you could use [jQueryUI's dialog](http://jqueryui.com/dialog/) and style it to suit your needs – Pete Oct 15 '14 at 09:54

1 Answers1

3

Lightbox supports images only.

There are alternative scripts that allow you to show HTML content.

Lokesh Dhakar
  • 5,289
  • 5
  • 22
  • 24