View Single Post
Old 10-08-2012, 04:14 AM   PM User | #7
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
in that case it's simple - just replace the tn_ and use that for the src...

Code:
$('.thumbs').click(function(e) {
    e.preventDefault();
    var image = $(this).attr('src').replace("tn_","")
       $('#bg').parent().fadeOut(800, function() {
            $('#bg').attr('src',image); 
              $(this).fadeIn(800);
        }); 
    });
xelawho is offline   Reply With Quote