简体   繁体   English

jQuery创建多级无序列表

[英]jQuery create multi-level unordered list

I'm trying to create a multi-level unordered list with jQuery. 我正在尝试使用jQuery创建多级无序列表。

In reality i'm sticking this into the jQuery autocomplete plugin, but i've dumbed down a jsFiddle keep it simple with hardcoded data and without the plugin. 实际上,我将其粘贴到jQuery autocomplete插件中,但是我简化了jsFiddle,使之易于使用硬编码数据而无需插件。

First the hardcoded output (what i want to see), then the dynamic output (with the code im trying). 首先是硬编码的输出(我想看到的),然后是动态输出(代码正在尝试)。

You can see what i've tried, but i'm not having too much luck so far. 您可以看到我尝试过的内容,但是到目前为止我还没有遇到太多的运气。 :) :)

Can anyone help me out? 谁能帮我吗? Or has anyone done this before? 还是以前有人做过?

Try to work with the categoryID's: jsFiddle 尝试使用categoryID: jsFiddle

Hope this helps... 希望这可以帮助...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM