[EMAIL PROTECTED] wrote:
> It's really a fine point, and I probably will use cycle next time
> something like this rolls around, but I don't like it putting an
> unnecessary class in there.
>
> If I could {% cycle even, "" %} or something, I'd probably be
> completely sold.

I recently migrated all my uses of 'cycle' to jQuery. I simply mark
tables with a class "report" that I want striped and put this in my
base.html template:

      $("table.report tr:even").addClass("alt");

I also put this to highlight the row the mouse is over:

      $("table.report tr").hover(function() { $(this).addClass("over");
},
                                 function() {
$(this).removeClass("over"); });

Then I just put this my CSS file.

    tr.alt td { background: #ecf6fc; }
    tr.over td { background: #ffffcc; }

I like this a lot better because I don't have to "code up" each table
to get the effect.

Just an idea...
-Dave


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to