sami1255
Apr 22nd 2009, 9:44 am
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 :D
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');">
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; ?>
Any free help will be really appreciated other wise if you wanna get some bucks outa it.. follow up with this thread (http://forums.digitalpoint.com/showthread.php?t=1317411)and lets see if we can have a deal
1) I got myself look moron to use table inside accordion item :D
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');">
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; ?>
Any free help will be really appreciated other wise if you wanna get some bucks outa it.. follow up with this thread (http://forums.digitalpoint.com/showthread.php?t=1317411)and lets see if we can have a deal