That html isn't valid. The nested ul element can't be a child of a ul. It
needs to be a child of an li, like so

<ul>
  <li></li>
  <li>
    <ul>
      <li></li>
    </ul>
  </li>
  <li></li>
</ul>

- Richard

On Wed, Mar 25, 2009 at 1:50 PM, Andrew <andrewgtibbe...@gmail.com> wrote:

>
> HTML:
> <ul>
>    <li></li>
>    <li></li>
>    <ul>
>        <li></li>
>    </ul>
>    <li></li>
> </ul>
>
> JS:
> $("ul li").click(function(){
>    $(this).next().doSomething();
> });
>
> When I click on any li that has an li after it, that next li will
> 'doSomething'.
> But, when I click on the li that has a ul after, only in IE, the ul is
> ignored and it will 'doSomething' to the li after the ignored ul. FF
> and Safari both act on the ul.
> Is there anyway to get IE to recognize the ul as the 'next()' of the
> li before it?

Reply via email to