New Landing How can we help? Themeforest Theme Support Pinpoint Create functions.php in child theme and change accordion collapse on open

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Pinpoint
  • #140582
    donnaklym
    Member
    Post count: 5

    I want to have all accordion collapse (closed) on refresh.

    I found the code in the forums for this:

    Change line 601(?) in /js/functions.js from

    jQuery(‘.accordion’).accordion({
    collapsible: true,
    autoHeight: false
    });

    to

    jQuery(‘.ui-accordion’).accordion({
    collapsible: true,
    active: false,
    autoHeight: false
    });

    -but it is in the file functions.js inside the /js folder, and so this would be overwritten when the theme is updated. Apparently I need to write any function changes to the functions.php file in the child theme to preserve them when the theme is updated, so I created an empty functions.php file on the root directory of my child theme to do this. Do I just paste in the new code here? Or do I need to copy the entire parent functions.php file to the new child theme functions.php file and just add the new code at the end?

    Thank you kindly for your help – I am not a developer so am piecing this together on my own.

    #140702
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Create a folder called js and then inside the folder create a file functions.js and then paste the whole code of js/functions.js from the parent theme in to it and edit your code in the Child themes/js/functions.js.

    Let us know,

    Thanks,
    laranz.

Viewing 2 posts - 1 through 2 (of 2 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