Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //lightbox
- $(".lightbox").live("click", function(event){
- event.preventDefault();
- var href=$(this).attr('href');
- $('body').append('<div class="overlay"></div>');
- var img = $('<img />').load(function () {
- $(".overlay").append(img);
- }).error(function() {
- $('.overlay').append('<p class="error">no big version</p>');
- }).attr('src', href);
- })
- $(".overlay").live("click", function(event){
- $(this).animate({'opacity':'0'}, 300, 'linear', function(){
- $(this).remove();})
- })
Add Comment
Please, Sign In to add comment