View Full Version : Button to close a specific header from ddaccordion

10-23-2018, 08:27 PM
I have and old script from your site which still work perfectly:
//** Accordion Content script: By Dynamic Drive, at http://www.dynamicdrive.com
//** Created: Jan 7th, 08'. Last updated: June 7th, 2010 to v1.9

As it is I can collapse an header by cliking back on it.
I'm looking to add a button which would do the same at the end of content.

I can do this to close all header with this:
onclick="ddaccordion.collapseall('headerclass'); return false"

But I'm looking to close one specific header. Each header have a unique different id.
<span id="commentHolder<?php echo strip_tags($id); ?>" class="headerclass">

Any ideas?

Thanks Vincent