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 ricardob...@gmail.com
The code in your test page still reads $(div:.postSummary
(odd)).addClass(odd), not
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 m...@digiflip.tv wrote:
Hi I'm just wondering whether it is possible to zebra stripe alternate divs
with the same class name?
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 m...@digiflip.tv wrote:
Hi I'm just wondering whether it is
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 aqua...@gmail.com
your colon is in the wrong place. (how often does one get to say that?)
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 morni...@gmail.com
I'm just curious... where are you getting your syntax from?
div:.postSummary
.postSummary-teaser(odd) ??
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
table
tr
tdRow 1/td
/tr
tr
tdRow 2/td
/tr
tr
tdRow
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:
!-- Entry --
div
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 m...@digiflip.tv wrote:
Thanks MorningZ :), yes that is the one I'm trying to mimic. odd is only
declared in:
8 matches
Mail list logo