23 days to give it a try before you buy! Download now. The best deals on licenses are coming soon Download now. The best deals on licenses are coming soon

Complex Accordion, programming examples of Complex Accordion

Complex Accordion

Do you want to make a complex accordion for your web app? Try the programming example below which allows creating multiple panes within an accordion. You are welcome to use free coding samples by Webix for your web development projects.

JS Code

webix.ui({
  view: "scrollview",
  scroll: "y",
  body: {
    type:"wide", 
    cols:[
      { width:30 },
      { type:"wide", 
       rows: [
         { height: 30 },
         {
           multi:true,
           view:"accordion", type:"wide",
           rows:[
             { header:"col 1", body:"content 1", height:150},
             { body:"Content 2", height: 35},
             { 
               collapsed:false, 
               header:"col 3",
               body:{
                 multi:true,
                 view:"accordion", type:"space",
                 cols:[
                   { header:"col 1", body:"content 1", width:150},
                   { body:"Content 2" },
                   { 
                     collapsed:false, 
                     header:"col 3",
                     body:"content 3",
                     width:150
                   },
                   { body:"Content 4" },
                   { header:"col 5", body:"content 5", width:150}
                 ]
               },
               height:150
             },
             { body:"Content 4", height: 35 },
             { header:"col 5", body:"content 5", height:150}
           ]
         },
         {
           multi:false,
           view:"accordion", type:"wide",
           cols:[
             { header:"col 1", body:"content 1", width:150 },
             { body:"Content 2"},
             { 
               header:"col 3",
               body:"content 3",
               width:150
             },
             { body:"Content 4" },
             { header:"col 5", body:"content 5", width:150}
           ]
         },
         { height: 30 }
       ]
      },
      { width:30 }
    ]
  }
});