Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 26th, 2013  |  syntax: None  |  size: 0.80 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $(".gallery a:has(img)").click(function() {
  2.  
  3.     var largePath = $(this).attr("href");
  4.     var image = $(".photo_large");
  5.         image.fadeOut('500', function () {
  6.         image.attr({ src: largePath }) ;
  7.         image.fadeIn('500');
  8.                       });
  9.     var description = $(this).next(".description").css("display", "inline");
  10.     $(".caption").html(description);
  11.       return false;
  12.           });
  13.        
  14. $(".gallery a:has(img)").click(function() {
  15.     var largePath = $(this).attr("href");
  16.     var image = $(".photo_large");
  17.     image.fadeOut('500', function () {
  18.         image.attr({ src: largePath }) ;
  19.         image.fadeIn('500');
  20.     });
  21.     var description = $(this).next(".description");
  22.     $(".caption").html(description.clone().css("display", "inline")); // <---- Changed
  23.     return false;
  24. });
clone this paste RAW Paste Data