On Oct 16, 2009, at 3:33 AM, Andrew Neil  
<andrew.jr.n...@googlemail.com> wrote:

> Nate,
>
> Sorry I can't answer your question directly, but as an alternative  
> you might
> consider applying the alternating classes to list elements using  
> javascript.
> Some of the appeal in offering Textile or markdown for content  
> editors is
> that they have a simple syntax to learn, e.g. asterisks create  
> bullet lists.
> As soon as you say to your editors "You have to add a class name in  
> brackets
> after the asterisk (but make sure there is no space between the  
> asterisk and
> the opening bracket!)", you've lost the simplicity of textile. It  
> would be
> preferable to keep the textile code simple, and apply the classes
> unobtrusively with javascript.
>
> The following snippet of jQuery would do the trick:
>
> $(document).ready(function() {
>  $("#content ul li:nth-child(3n+1)").addClass("one");
>  $("#content ul li:nth-child(3n+2)").addClass("two");
>  $("#content ul li:nth-child(3n)").addClass("three");
> });


Thanks for that. But what I am trying to do works in the "try  
redcloth" area of the redcloth site. So it is within the capabilities  
of redcloth even though it isn't working in radiant. That's really the  
focus of my previous post. Well it was intended to be.

The unordered list is part of a footer snippet that won't be changed  
very often so the simplicity of textile doesn't really matter here.  
Honestly I gave up on textile and just styled it by hand.

~Nate

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to