开发者

Lightbox2 - display div's content instead of image

开发者 https://www.devze.com 2023-03-13 12:28 出处:网络
I would like to know how to use Lightbox2 to display the contents of a div. Currently I am using the following line of code to displa开发者_运维知识库y an image.

I would like to know how to use Lightbox2 to display the contents of a div.

Currently I am using the following line of code to displa开发者_运维知识库y an image.

<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>

Is it possible to display a div's content instead of the image?

Thanks for any hints provided :)


Lightbox is for images. If you're looking to display content, create a new page and embed an iframe with Fancybox: http://fancybox.net/

To do iframe, include jquery, then the necissary fancybox javascript & css files you can download, then call it with this code:

<script>
$("a.fancyiframe").fancybox({
    'type':'iframe',
});
</script>

then setup your link element:

<a class="fancyiframe" href="http://www.yoursite.com/place.html">This goes to iframe</a>
0

精彩评论

暂无评论...
验证码 换一张
取 消