> I am trying to get/set only text  of list only element text value.
> But for some reason I can not select it in clear way.
>
> <ul>
> <li id="myid">  Here text that I want to modify
> <ul>
> <li id="dfdf">i don't want modify this</li>
> <li id="dfdf">i don't want modify this</li>
> </ul>
> </li>
> <ul>

You didn't show your code, but I assume you tried something like $
("#myid").text() and got the text for all three li elements. That's
because the second ul is nested in the first li. Wrap the text you
want to modify in a span and then you can select/change it with $
("#myid span").text()

Also, the second two li elements have the same id, which is invalid.

Reply via email to