Mercurial > public > sg101
diff gpp/forums/static/js/forums.js @ 483:3ac558402014
For #232, added some javascript to resize pics inside forum posts if they are too big.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 15 Oct 2011 22:04:18 +0000 |
parents | 84bcaff13129 |
children |
line wrap: on
line diff
--- a/gpp/forums/static/js/forums.js Fri Oct 14 02:12:05 2011 +0000 +++ b/gpp/forums/static/js/forums.js Sat Oct 15 22:04:18 2011 +0000 @@ -287,4 +287,11 @@ } initAttachments(); + + $('div.forum-post-body img').fadeIn('fast', function() { + var pic = $(this); + if (pic.width() > 720) { + pic.css('width', '720px'); + } + }); });