On Dec 15, 2:13 pm, huntspointer2009 wrote:
> I actually modified the code you provided for me a little to create
> the desired effect:
Yeah, there was a small mistake in that. This would probably work:
$(this).find("li:nth-child(4n+2), li:nth-child(4n+3)").addClass
("color");
The diff
Thanks Scott,
I actually modified the code you provided for me a little to create
the desired effect:
previous code:
$("ul ").each(function() {
$(this).find("li:nth-child(4n+2)", "li:nth-child(4n
+3)").addClass("color");
});
modified code:
$('ul').each(function() {
$(this).find("l
On Dec 15, 12:53 pm, huntspointer2009 wrote:
> thanks Virgil,
> Is there a way to create the same effect without specifying the ( eq:
> (' ') exact location) or (the content that inside) the list item?
> because I might be using up hundreds of unordered lists,
> each with a variable number of ta
thanks Virgil,
Is there a way to create the same effect without specifying the ( eq:
(' ') exact location) or (the content that inside) the list item?
because I might be using up hundreds of unordered lists,
each with a variable number of tags?
original code:
jhbshsbjhs
udjkdnchb
dkdnjkndjk
hbd
If you want it to depend from the content you can combine 'filter' and
'contains' like so;
$("li").filter(":contains('02'),:contains('03'),:contains
('06'),:contains('07')").addClass('color');
Or if its the position, iterate over the ul's and the 'eq' looks up
the
position for each li.
$('ul').e
If you want it to depend from the content you can combine 'filter' and
'contains' like so;
$("li").filter(":contains('02'),:contains('03'),:contains
('06'),:contains('07')").addClass('color');
Or if its the position iterate over the ul's and the 'eq' looks up the
position for each ul.
$('ul').ea
If you want it to depend from the content you can combine 'filter' and
'contains' like so;
$("li").filter(":contains('02'),:contains('03'),:contains
('06'),:contains('07')").css('background-color','green');
Or if its the position iterate over the ul's and the 'eq' looks up the
position for each u
7 matches
Mail list logo