HI to all, Actually I have used accordion script.

but it is not working in IE.

Kindly help me immediately.

Thanks

2 answers

0
points

need more info please

Answered almost 7 years ago by Matt Milburn
0
points

Here's a demo of a prototype version I frequently use:

the HTML:

<h2 class="accordion_toggle">title</h2>
<div class="accordion_content">content here</div>
.....
<h2 class="accordion_toggle">title</h2>
<div class="accordion_content">content here</div>

the JS:

document.observe('dom:loaded', function() {
            var accordionDisabled = false;
            $$('.accordion_toggle').invoke('observe', 'click', function (event) {
                var handle = event.findElement('.accordion_toggle');
                $$('.accordion_toggle').invoke('removeClassName', 'accordion_toggle_active');
                handle.addClassName('accordion_toggle_active');
                var next = handle.next('.accordion_content');
                var previous = $$('.accordion_content').find(function (elm) { return elm.visible(); });
                if (next == previous) {
                    return;
                }
                accordionDisabled = true;
                var effects = [
                    new Effect.BlindUp(previous),
                    new Effect.BlindDown(next)
                ]
                new Effect.Parallel(effects, {
                    duration: 0.5,
                    afterFinish: function () {
                        accordionDisabled = false;

                    }
                });
            });
        });

Works great on all browsers (don't use position:relative on any element in div.accordion_content, IE is very buggy with overflowing these kind of things).

Answered almost 7 years ago by Razvan Pavel