diff gpp/comments/static/js/comments.js @ 489:f785a646a5fc

For #232, add some javascript to resize large images in user comments.
author Brian Neal <bgneal@gmail.com>
date Wed, 19 Oct 2011 23:31:22 +0000
parents 88b2b9cb8c1f
children
line wrap: on
line diff
--- a/gpp/comments/static/js/comments.js	Wed Oct 19 01:24:46 2011 +0000
+++ b/gpp/comments/static/js/comments.js	Wed Oct 19 23:31:22 2011 +0000
@@ -63,4 +63,11 @@
         }
         return false;
     });
+
+   $('.comment-text img').fadeIn('fast', function() {
+         var pic = $(this);
+         if (pic.width() > 720) {
+            pic.css('width', '720px');
+         }
+   });
 });