Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
8788 Zobrazení

Hi all,

Here i want insert a <li> item inside existing <ul>.

I tried this,

XML

<ul id="top_menu">
    <li><a>1</a></li>
    <li><a>2</a></li>
    <li><a>3</a></li>
</ul>
XPATH

  <xpath expr="//ul[@id='top_menu']/li[1]" position="after">
     <li><a>100</a></li>
  </xpath>
I got my new item "100" at last item of <ul>. but i need it in after 1 item.

Thanks in advance..
Avatar
Zrušit

You could also use "//ul" position="inside"

Nejlepší odpověď

I've tested your code, and it works fine with me. As expected ....

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
dub 23
8500
3
dub 21
8309
3
zář 20
4441
2
čvn 20
5587
2
dub 20
6192