Before you ask please READ THIS

Collapse Accordion

edited May 2013 in Skyfashion Posts: 10
I'm trying to collapse all items in an accordion. It seems that the first item is expanded by default but I want everything to be collapsed. Any way to do this?

Comments

  • Posts: 493
    Hi kucholtz,

    Please send me link to page with that issue.

    With regards
  • Posts: 493
    This functionality isn't available normally in our theme.

    If you want to callapse all elements in accordion edit file common/js/scripts.js.
    In line 100 you have a definition of accordion. Delete this lines from your file:
    
      $(".acc_content").hide();
        $(".acc_title:first").addClass("active_acc menu_line_top link_hover");
        $(".acc_content:first").show();
        $(".acc_title").click(function () {
            $(".acc_title").removeClass("active_acc  menu_line_top link_hover"); //Remove any "active" class
            $(this).addClass("active_acc  menu_line_top link_hover"); //Add "active" class to selected tab
            $(".acc_content").hide(); //Hide all tab content
            var activeTab = $(this).parent(); //Find the rel attribute value to identify the active tab + content
            activeTab = $(activeTab).children(".acc_content"); //Fade in the active content
            $(activeTab).fadeIn();
            return false;
        });
    
    
    Let me know if it works for you

    With regards
  • I am trying to collapse all elements as above, is this the same way you would do it now?
  • AirAir
    Posts: 10,000
    I believe it should work. Just make backup of file you wish to edit, and give it a try.

    With kind regards.
  • Just to confirm, you are referring to the wordpress/wp-content/themes/ceevee/js/scripts.js file, correct?
    there nothing similar to this bit of code, I must have the wrong file location, can you please clarify?

    thanks!
  • AirAir
    Posts: 10,000
    You wrote in Skyfashion theme topic. You will have to start new topic in CeeVee category, so developer of this theme will answer you. Sorry, I couldn't know :-)

    With kind regards.
  • :-) oppss I just searched on key word, didn't notice the theme

    thanks!
Sign In or Register to comment.