New Landing How can we help? Themeforest Theme Support Ability how to close the accordion by default

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Ability
  • #6339
    Marina-lesvirees
    Member
    Post count: 2

    I use the accordion shortcode in one of my page, addind :

    [accordion]
    [panel title=”mytitle”]
    some text
    [/panel]
    [/accordion]

    The code works except that the first accordion box is always open by default when the page first opens (not the ones bellow though) and I would like all the accordions to be closed at page’s opening.

    What must I do?

    Thanks by advance.

    Marina.

    #6416
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Marina,

    You’d need to edit /js/functions.js.php lines 865-868:

            $j('.accordion').accordion({
            	active: false,
                collapsible: true,
                autoHeight: false
            });
    

    – Ed

    #6459
    Marina-lesvirees
    Member
    Post count: 2

    Hi Ed

    Thanks for your quick answer. Unfortunately this doesn’t work for me… the first accordion box is still open by default…

    #6665
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Can you provide a link so that I can check?

    – Ed

    #6676
    Marina-lesvirees
    Member
    Post count: 2

    Yes, the problem is on this page : http://les-virees-electroniques.com/programmation/

    Thanks again for your time 🙂

    I did the changes you told me now the accordion section in functions.js.php , I did it from the wp board editor :

    /////////////////////////////////////////////
    // Reload Functions
    /////////////////////////////////////////////

    var reloadFunctions = {
    init:function() {

    // Remove title attributes from images to avoid showing on hover
    $j(‘img[title]’).each(function() {
    $j(this).removeAttr(‘title’);
    });

    $j(‘.gallery-icon a[title]’).each(function() {
    $j(this).removeAttr(‘title’);
    });

    // Tabs Shortcode Function
    $j(‘.tabbed-asset’).tabs();

    // Accordion Shortcode Function
    $j(‘.accordion’).accordion({
    activate: false,
    collapsible: true,
    autoHeight: false
    });

    }
    }

    Marina.

    #7000
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Ahh ok. It’s because in the google analytics box you’ve got the script tags in there. Please remove the opening and closing tags.

    – Ed

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register