Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Foundation Collapsible List

Foundation Collapsible List

You can use a collapsible list when you want to hide some content from display.

Example

<

ul

class=

"accordion"

data-accordion

<

li

class=

"accordion-navigation"

<

a

href=

"#demo"

Simple Collapsible

<

/a

<

div

id=

"demo"

class=

"content"

      Runoob Tutorial -- learn not only technology, but also dreams!!!

   

<

/div

<

/li

<

/ul

<

script

$(document).ready(function() {

    $(document).foundation();

})

<

/script

Try it »

Example Parsing

.accordion class and data-accordion The attribute is used to create a collapsible element. .accordion-navigation The class is used to render a collapsible element. The actual content is in .content class (

We add in the list item element to control (show/hide) the collapsible content. Then the anchor link uses the same id as the collapsible content (