views:

652

answers:

2

Is there another way to activate an accordion menu besides the

.accordion('activate', indexval); method? In IE7 this changes my header DIV formatting (it smashes it). The accordion is at the base of the page so when it is activated my header disappears. Can anyone offer me some help with this?

Here's what I have.. The the activation is causing top header div to disappear.

 var targetOffset = $('.HwContentInformation').offset().top;
                $('#content,#header').animate({ scrollTop: targetOffset }, .5);

                $("#HwReferences").accordion('activate', 0);

Thanks

Nick

A: 

I once had a similar problem, by default accordion will use <h3> tags for it's header elements. Your page header probably has an <h3> tag in it that you aren't expecting to be in the accordion.

What you could do, is change the headers in #HwReferences to <h5> and then do something like this:

$("#HwReferences").accordion({'header': 'h5'}).accordion('activate',0)

HTH

Robert
Thanks for the attempt but the header does not actually contain a <h> of any type.
Nick
A: 

Turns out that my content page had some faulty Javascript that was subtracting the height of the header from the content area. This was setting the header to '0' thus hiding it when the page refreshed. Thanks for the attempt.

Nick