# HG changeset patch # User Brian Neal # Date 1299631781 0 # Node ID 84bcaff131296820afbb3495a8d6c2220a466306 # Parent a9bb32706aa69bd1bbd60858b8bfd78ae94a9d62 Added logic to the forums javascript that adds the proper CSS class (odd or even) to a new post. diff -r a9bb32706aa6 -r 84bcaff13129 gpp/forums/static/js/forums.js --- a/gpp/forums/static/js/forums.js Tue Mar 08 03:31:30 2011 +0000 +++ b/gpp/forums/static/js/forums.js Wed Mar 09 00:49:41 2011 +0000 @@ -22,8 +22,11 @@ dataType: 'html', success: function (data, textStatus) { postText.val(''); - $('#forum-topic tr:last').after(data); var lastTr = $('#forum-topic tr:last'); + var newClass = lastTr.hasClass('odd') ? 'even' : 'odd'; + lastTr.after(data); + lastTr = $('#forum-topic tr:last'); + lastTr.addClass(newClass); lastTr.hide(); lastTr.fadeIn(3000); postButton.removeAttr('disabled').val('Submit Reply');