问题
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