jQuery UI Accordion in Accordion

前端 未结 2 1336
时光说笑
时光说笑 2021-02-20 12:58

Is it possible to have an accordion embedded in another accordion with jQuery UI?

-Item One
-Item Two
-Item Three
  --Sub One
  --Sub Two
  --Sub Three
-Item Fou         


        
2条回答
  •  你的背包
    2021-02-20 13:37

    Just give different id names for each accordion and call them in the jquery function an you would have to edit the css to get the desired look though.

    $(function() {
        $( "#accordion,#accordion2" ).accordion();
      });
    

    DEMO

提交回复
热议问题