Reputation: 3719
While searching for a lightbox plugin via Google surfing. There I end up with the one at http://kyleschaeffer.com/development/lightbox-jquery-css/ and the source code is available there.
The script is short, simple and customizable. Then I noticed it doesn't have a close button icon. The guy on the webpage said "you could easily add a “close” button to your lightbox by connecting it to the closeLightbox();" but I don't see an example nor do I know how exactly to accomplish that.
Thanks.
Upvotes: 1
Views: 4297
Reputation: 1427
I added to the original code the close button and some styling for it.
var close = $('<a href="#" class="x">x</a>');
close
.appendTo('#lightbox')
.click(function(e){
e.preventDefault();
closeLightbox();
});
Upvotes: 2