lightbox no image just text?

半世苍凉 提交于 2019-12-06 02:34:08

问题


I am currently using light box provided by ... http://leandrovieira.com/projects/jquery/lightbox/

How do I have it so that if I click on a work it brings up the light box and shows text instead of an image? what I want is the terms and conditions shown up in a lightbox.

HTML

<span id="terms"> <a href="">Terms & Conditions</a></span>

jQuery

$(function () {
   $('#terms a').lightBox();
});

回答1:


It seems like this lightbox plugin only works with images. You should choose another plugin like colorbox: http://jacklmoore.com/colorbox/ It's simple to use and supports iframes and also div elements inside the lightbox.




回答2:


I don't think that you can use the plugin as you desire,because that plugin works with images, in any case specify the text you want to appear in the title of the <a>

 <a title="this plugin takes text from here" href="">Terms & Conditions</a>

But i think you will have to find another plugin




回答3:


I like to use Fancybox to show content in a lightbox. Create a simple HTML page for your terms and conditions then the page will load within the lightbox. If Javascript is disabled they will be taken to the page via the link

http://fancybox.net/



来源:https://stackoverflow.com/questions/9618686/lightbox-no-image-just-text

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!