Accordion loading problem

Discussion in 'JavaScript' started by sami1255, Apr 22, 2009.

  1. #1
    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');">
    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
     
    sami1255, Apr 22, 2009 IP
  2. JavaScriptBank.com

    JavaScriptBank.com Peon

    Messages:
    141
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    JavaScriptBank.com, Apr 22, 2009 IP
  3. sami1255

    sami1255 Well-Known Member

    Messages:
    835
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    125
    #3
    its more like promoting your site rather than help ;)
     
    sami1255, Apr 23, 2009 IP