Allows you to use an XML file or XML string as a source for the accordion's content. The path of the XML file or the XML string must be passed to the 'XMLSource' property.


    XMLSource: 'path/to/file.xml',
    width: 960, 
    height: 400

In the accordion's HTML code, you will only need to create the main container DIV. The rest will be created automatically, based on the XML data.

<div id="example-xml" class="accordion-slider"></div>

The syntax used in XML is similar to that used in HTML. Some differences would be that the as-prefix is not used anymore for classes, the data- prefix is not used for attributes, and using the dash (-) as a delimiter is replaced with using the CamelCase notation.

These are the node names that need to be used:

  • accordion : for the root node
  • panel : for panel nodes
  • background : for background images
  • backgroundLink : for links attached to background images
  • backgroundRetina : for alternative, high resolution images
  • backgroundOpened : for alternative images that will appear when the panel is opened
  • backgroundOpenedLink : for links attached to the opened background image
  • backgroundOpenedRetina : for retina version of the opened background image
  • layer : for layer nodes




If you want to use lazy loading, you simply need to add the lazyLoading attribute to the rootaccordion node and specify the path of the placeholder image.


<accordion lazyLoading="path/to/blank.gif">

When using layers, the equivalent for the class attribute is the style attribute. As noted before, the as- and data- prefixes are not used anymore and the names of the attributes use a CamelCase notation. It's important to already be familiar with the 'Layers' module before learning how to use layers in XML. The available styles and attributes are enumerated below, but check the presentation of the 'Layers' module for a description of these.


  • opened
  • closed
  • black
  • white
  • padding
  • rounded.


  • width
  • height
  • depth
  • position
  • horizontal
  • vertical
  • showTransition
  • showOffset
  • showDuration
  • showDelay
  • hideTransition
  • hideOffset
  • hideDuration
  • hideDelay

This module is showcased in example_xml.html, which is the XML version of example1.html. Please check the XML file created for this example, accordion.xml, to see how layers can be created in XML.

Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk