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.