views:

45

answers:

0

I'm implementing the jquery Nested Accordion script found here: http://www.adipalaz.com/experiments/jquery/nested_accordion_demo.html

While it expands just perfectly, none of the sections will collapse if you click on an expanded one. Can anyone help me see what's wrong?

This is the jquery:

$(document).ready(function () {

    $('#main').accordion({
        objID: "#acc", 
        obj: "div",
        wrapper: "div",
        el: ".h", 
        head: "h4, h5, h6", 
        next: "div", 
        showSpeed: 0,
        hideSpeed: 0,
    });
});

And, here's the markup:

<div id="main">
    <div class="accordion" id="acc">


    <h4>1) Level One</h4>
        <div class="inner">
        <h5>Level Two</h5>
            <div class="inner">
            <h6>1. Level Three</h6>
                <div class="inner">
                <li>item 1</li>
                <li>item 2</li>
                </div>
            <h6>2. Level Three</h6>
                <div class="inner">
                <li>item 1</li>
                <li>item 2</li>
                </div>
            </div>

        <h5>Level Two</h5>
            <div class="inner">
            <p>Item</p>
            </div>
        </div>



    <h4>2) Level One</h4>
        <div class="inner">
        <h5>Level Two</h5>
            <div class="inner">
            <h6>1. Level Three</h6>
                <div class="inner">
                <li>item</li>
                <li>item</li>
                </div>
            <h6>2. Level Three</h6>
                <div class="inner">
                <li>item</li>
                <li>item</li>
                </div>
            </div>

        <h5>Level Two</h5>
            <div class="inner">
            <p>item</p>
            </div>
        </div>


    </div>
</div>