Title: opening content by button
Last modified: October 18, 2016

---

# opening content by button

 *  Resolved [katia_d](https://wordpress.org/support/users/uroboro_comunicazione/)
 * (@uroboro_comunicazione)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/content-opened-by-button/)
 * How can i make your shortcode work by clicking a button?
    Thank you
    -  This topic was modified 9 years, 8 months ago by [katia_d](https://wordpress.org/support/users/uroboro_comunicazione/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [philbuchanan](https://wordpress.org/support/users/philbuchanan/)
 * (@philbuchanan)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/content-opened-by-button/#post-8323276)
 * You could try something like:
 *     ```
       $('.open-everything').click(function() {
       	$.each($('.accordion-title'), function(index, value) {
       		if (!$(this).hasClass('open')) {
       			$(this).trigger('click');
       		}
       	});
       });
       ```
   
 * And then have a button with the classname of `open-everything`:
 * `<button class="open-everything">Open Everything</button>`
 * Make sure to set autoclose=false on your open accordion shortcode.

Viewing 1 replies (of 1 total)

The topic ‘opening content by button’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/accordion-shortcodes.svg)
 * [Accordion Shortcodes](https://wordpress.org/plugins/accordion-shortcodes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accordion-shortcodes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accordion-shortcodes/)
 * [Active Topics](https://wordpress.org/support/plugin/accordion-shortcodes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accordion-shortcodes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accordion-shortcodes/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [philbuchanan](https://wordpress.org/support/users/philbuchanan/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/content-opened-by-button/#post-8323276)
 * Status: resolved