javascript accordian menu problem in worpress

Posted by Praveen kalal on Stack Overflow See other posts from Stack Overflow or by Praveen kalal
Published on 2011-01-03T11:37:34Z Indexed on 2011/01/03 11:53 UTC
Read the original article Hit count: 185

Filed under:
|

hi all i am working on wordpress project there is i used accordion for right sidebar but all the link are over lapping each other in IE8 its working fine mozzila so plz help my code is

var parentAccordion=new TINY.accordion.slider("parentAccordion"); parentAccordion.init("acc","h4",1,-1); var nestedAccordion=new TINY.accordion.slider("nestedAccordion"); nestedAccordion.init("nested","h4",1,-1,"acc-selected");


    $args = array('parent'=>0,'hide_empty'=>0);
    $cats = get_categories($args);

    echo '<ul id="acc" class="acc">';
    foreach($cats as $key => $val)
    {
        $args1=array(
        'showposts' => 10,
        'category__in' => array($val->term_id),
        'caller_get_posts'=>1
         );
        $post=get_posts($args1);

        echo '<li><h4>'.$val->name.'</h4>';
        echo '<div class="" style="opacity: 0; height: auto;">';
        echo '<ul id="nested" class="acc">';
        if(isset($post) && !empty($post))
        {
             foreach($post as $key1 => $val1)
             {
                echo '<li class="cat-item"><a title='.$val1->post_title.' href='.$val1->guid.'>'.$val1->post_title.'</a>';  
             }  
        }

        $subcats = get_categories(array('parent'=>$val->term_id,'hide_empty'=>0));

         if(isset($subcats) && !empty($subcats))
         {

            foreach($subcats as $k => $v)
            {
               echo '<li><h4 class="">'.$v->name.'</h4>';

                $args2=array(
                    'showposts' => 10,
                    'category__in' => array($v->term_id),
                    'caller_get_posts'=>1
                 );
                $post1=get_posts($args2);

                if(isset($post1) && !empty($post1))
                {
                    echo '<div class="" style="opacity: 1; height: auto;">';
                    echo '<ul class="children" style="padding-left:15px;">';    
                     foreach($post1 as $key2 => $val2)
                     {
                        echo '<li><a title='.$val2->post_title.' href='.$val2->guid.'>'.$val2->post_title.'</a></li>';  
                     }  
                    echo '</ul></div>'; 
                }

            }

         }

     echo "</ul>";
     echo "</li>";
}
echo '</ul>';
?>
</div>

so plz help me

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about Wordpress