DHTMLX Docs & Samples Explorer

Constructor of dhtmlxAccordion

    var accord = new dhtmlXAccordion(parent, skin);

where

  • parent - id of HTML element which will be used as parent (or object itself);
  • skin - name of skin, optional (string);
      <div id='my_accord_here' style="width:500px; height:150px;"></div>
      <script>
          //common init code
          var dhxAcc = new dhtmlXAccordion("my_accord_here");
      </script>

Layout, Window, Accordion, Tabbar can create folders inside their cells by using

      some_component.cells(some_id).attachAccordion()

Starting from 2.5 version fullscreened initialization is available in the accordion.

First, you should define the following style

    html, body {
        width: 100%;
        height: 100%;
        margin: 0px;
        overflow: hidden;
    }

and the init dhtmlxAccordion as follows

    var dhxAcc = new dhtmlXAccordion(document.body);

Starting from 2.5 version, folders can be initialized by object notation

      var dhxAcc = new dhtmlXAccordion({
          some_option1:some_value_1,
          some_option2:some_value_2,
          ...
          some_optionN:some_value_N,
      })

List of supported options

	var dhxAcc = new dhtmlXAccordion({
		parent:"my_accord_here",
		onActive:function(){
			alert("I'm active");	
		}
	});