MartyB schrieb:
I'm a newbee. I want to create a collapsable ul. But I want each
visible li (including both parent li and child li's ) to alternate the
background color. The problem is that when I apply the background to
the parent, all of the child li's do not change color they inherit the
pare
this might sound dumb, but try using 'display:block;'?
On Fri, Oct 24, 2008 at 4:32 PM, Alexandre Plennevaux
<[EMAIL PROTECTED]> wrote:
>
> Yup I second Mike's advise. Make sure first that CSS allows it in a
> static demo file, then when you get it to work, you'll know what to
> script exactly.
>
Yup I second Mike's advise. Make sure first that CSS allows it in a
static demo file, then when you get it to work, you'll know what to
script exactly.
Just a remark $('ul ul li') is not the same as $('ul li'). In the
first case it would only concern li which are inside an ul, inside
another ul (
Suggestion: Forget jQuery for a while. Instead, hand-edit an HTML file and
see if you can get the styling the way you want.
That way you don't have to troubleshoot both sides at once. All you have to
worry about is the HTML and CSS.
If you can get that to work, then you can duplicate the effect
Alexandre,
Your solution yields the same results as the original problem.
How is "ul li" different from "li" since li cant exist without a
parent ul, thus ul is redundant and unnecessary?
The more I am studying this, the more I am convinced that what I am
trying to do is impossible.
It is impossib
The parent color is showing through...
put
.stripeable { background-color: #FFF }
in there to see what I mean
On Oct 24, 2:24 pm, MartyB <[EMAIL PROTECTED]> wrote:
> I'm a newbee. I want to create a collapsable ul. But I want each
> visible li (including both parent li and child li's ) to alter
come on marty try reviewing your css skills a little bit especially
the css selectors. You 've got it wrong, but this should do :
$('ul li.stripeable:even').addClass('greenbar');
On Fri, Oct 24, 2008 at 8:47 PM, MartyB <[EMAIL PROTECTED]> wrote:
>
> With...
> $('ul ul li.stripeable:even').addC
With...
$('ul ul li.stripeable:even').addClass('greenbar');
it only stripes the child li's not the parent li's also.
I want every line in the display to be striped in sequential order.
Marty
Try
$('ul ul li.stripeable:even').addClass('greenbar');
$('li.stripeable:even').addClass('greenbar');
Mauricio
9 matches
Mail list logo