jquery lightbox,popup
I want to add on a div a description text, and when a user click's on that text I want to 开发者_开发技巧appear a lightbox or popup with some external content. How do I make this?
Can you provide some sample code of the "div a description text" you are going to have setup. Setting up a lightbox is usually fairly simple if your using jQuery I would find a plugin that does what you need and then the code will be something similar to this
function descPopUp(){
$("#divid a").lightbox();
//or a class could be use on the anchor text
//also some functions might require you to bind it to click
$("#divid a").click(function(){
$("#id").lightbox();
});
}
I am guessing your html will look something like this
<div id="someid">
content
<a href="#" class="desc" onclick="javascript:descPopUp()">Description text</a>
</div>
精彩评论