[jQuery] Re: how to zebra stripe divs?

2009-02-17 Thread mark law
Great Scott! you are right, it is working now :) Many thanks indeed everyone you are all legends!, I shall write this up in my blog, thanks again :) 2009/2/17 Ricardo Tomasi > > The code in your test page still reads $("div:.postSummary > (odd)").addClass("odd"), not $("div.postSummary:odd").add

[jQuery] Re: how to zebra stripe divs?

2009-02-16 Thread Ricardo Tomasi
The code in your test page still reads $("div:.postSummary (odd)").addClass("odd"), not $("div.postSummary:odd").addClass("odd"); On Feb 17, 12:04 am, mark law wrote: > Thanks MorningZ :), yes that is the one I'm trying to mimic. "odd" is only > declared in: > > $("div.postSummary-teaser:odd").a

[jQuery] Re: how to zebra stripe divs?

2009-02-16 Thread mark law
Thanks MorningZ :), yes that is the one I'm trying to mimic. "odd" is only declared in: $("div.postSummary-teaser:odd").addClass("odd"); Where else should it be? I was hoping this code would just add it to alternate divs with a class of "postSummary-teaser" The html is actually:

[jQuery] Re: how to zebra stripe divs?

2009-02-16 Thread MorningZ
so this is the jQuery you are trying to mimic? $("tr:nth-child(odd)").addClass("odd"); ?? that uses current selector syntax (http://docs.jquery.com/Selectors/ nthChild#index), and would indeed work on Row 1 Row 2 Row 3 Row 4

[jQuery] Re: how to zebra stripe divs?

2009-02-16 Thread mark law
I copied it from here: http://blog.jquery.com/2006/10/18/zebra-table-showdown/ and tried unsuccessfully to modify it for div classes ... 2009/2/17 MorningZ > > I'm just curious... where are you getting your syntax from? > > "div:.postSummary" > > ".postSummary-teaser(odd)" ?? > > there's n

[jQuery] Re: how to zebra stripe divs?

2009-02-16 Thread mark law
Thanks Stephen, I suppose it's usually only doctors who say "your colon is in the wrong place" ;), unfortunately it still doesn't work :(, I appreciate your help though 2009/2/17 aquaone > your colon is in the wrong place. (how often does one get to say that?) > $("div.postSummary-teaser:odd").a

[jQuery] Re: how to zebra stripe divs?

2009-02-16 Thread MorningZ
I'm just curious... where are you getting your syntax from? "div:.postSummary" ".postSummary-teaser(odd)" ?? there's now where in the documentation (http://docs.jquery.com) where that syntax is shown On Feb 16, 6:31 pm, morktron wrote: > Hi I'm just wondering whether it is possible to

[jQuery] Re: how to zebra stripe divs?

2009-02-16 Thread aquaone
your colon is in the wrong place. (how often does one get to say that?) $("div.postSummary-teaser:odd").addClass("odd"); stephen On Mon, Feb 16, 2009 at 15:31, morktron wrote: > > > Hi I'm just wondering whether it is possible to zebra stripe alternate divs > with the same class name? > > The