Form_remote_tag/partials/cycle

All,

Running into a small issue that I’m not sure how to eloquently resolve.
I have a partial that reads something similar to:
http://pastebin.com/m16c4295e

The problem is when I invoke this partial from an action (kicked off by
a form_remote_tag)…


if @comment.save
render :partial => ‘comment’
else
render :partial => ‘invalid_comment’, :status => 444
end

So, given three ‘comments’, I’ll see the following styles:
‘comment’/‘comment alt’/‘comment’, however, when I go to add another
comment, the partial is invoked with no context and thusly uses the
first item in the cycle - ‘comment’ which effectively breaks the css
layout.

Clearly what I’m wanting to accomplish is:
comment
comment alt
comment
comment alt

But instead I’m having to deal with
comment
commment alt
comment
comment

Any suggestions on how to cycle my styles after a remote/partial update?
I guess I could write some js to clean things up but I’m sure I’m
missing something.

Help and thanks.