I’m trying to replicate the “green-bar” effect used in the Depot app
using Ajax. And I’m almost there I’m about to set off on the last
stage and would appreciate any advice that would set me off in the right
direction.
On the page, each record is represented by a
“item#{record.id}” with class = either Listline0 or Listline1 which are
defined in my stylesheet to be of different colors. Each
s inside. One of the s has a link_to_remote to ‘delete’ the
item. When the link gets used, the record gets deleted from the db and
the
When the user deletes an item, it screws-up the green-bar effect. I
expected that. And I figured there’d be a Rails (i.e., simple) way to
go through the set of remaining
deletion down) and reset the class= to fix the effect. I can’t find it.
I see that I can use replace to basically over-write the
can’t find any way to read the content of the
since link_to_remote to ‘delete’ the ingredient has to have the record
id, I can’t see any way to use Ajax to correct the green-bar effect.
That doesn’t seem right. That is, I’ll bet I’m wrong and that one of
you can point me to the piece I’m missing. Sure would appreciate it.
Thanks in advance for any help,
Bill