well i dont know java scripting at all... heres a problem iam facing. 1) I got myself look moron to use table inside accordion item 2) Everything is perfect except accordion items show all content and then hide em, on bodyload. 3) what i want is that onbodyload, the accordion loads the content without showing them. here is a bit of code to help you out.. <body onload="new Accordian('accordian',9,'header_highlight');"> Code (markup): menu displays.. <div id="accordian" ><!--Parent of the Accordion--> <?php $i = 1; if (have_posts()) : while (have_posts()) : the_post(); ?> <!--Start of each accordion item--> <div id="test<?php if ($i != 1) { echo $i-1; } ?>-header" class="accordion_headings<?php if ($i == 5) { ?> header_highlight<?php } ?>" ><?php the_title(); ?></div><!--Heading of the accordion ( clicked to show n hide ) --> <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content--> <div id="test<?php if ($i != 1) { echo $i-1; } ?>-content"><!--DIV which show/hide on click of header--> <!--This DIV is for inline styling like padding...--> <div class="accordion_child"> <?php the_content(''); ?> </div> </div> <!--End of each accordion item--> <?php $i++; endwhile; ?> Code (markup): Any free help will be really appreciated other wise if you wanna get some bucks outa it.. follow up with this thread and lets see if we can have a deal
in your code above, you use onLoad event directly, maybe cause of this; you should use the smarter onload script; you can use one of them from my JavaScript library, as: Multiple Functions onLoad if still there's error, please let me know