• Resolved judyvedder

    (@judyvedder)


    I have the js file exactly as you show in the FAQ section and I have verified that the file is being loaded in view source. I went through your support thread and saw that I need autoclose=”false” in the accordion area. [accordion autoclose=”false” clicktoclose=”true” tag=h6] . I have tried [accordion-item] with and without a state set. Can you provide an example with the settings that work? Also where does the button code with class=js-open-everything go? Before the [accordion] or after. I cannot get this to work!

Viewing 1 replies (of 1 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    The button to open and close the accordions can go anywhere on the page, as long as the JavaScript file is loaded after it.

    Your opening accordion tag looks right as well.

    Here is an example you can paste into the Text (HTML) tab of your page editor:

    <button class="js-open-everything">Open Everything</button>
    
    [accordion autoclose="false" clicktoclose="true" tag=h6]
    
    [accordion-item title="Accordion Item One"]
    
    Content here.
    
    [/accordion-item][accordion-item title="Accordion Item Two"]
    
    More content here.
    
    [/accordion-item][accordion-item title="Accordion Item Three"]
    
    Third block of content goes here.
    
    [/accordion-item]
    
    [/accordion]

    There may also be an issue with the JavaScript, depending on where you place it in your file. Maybe try this:

    jQuery(document).ready(function($) {
    	$('.js-open-everything').click(function() {
    	    $.each($('.accordion-title'), function(index, value) {
    	        if (!$(this).hasClass('open')) {
    	            $(this).click();
    	        }
    	    });
    	});
    });
Viewing 1 replies (of 1 total)
  • The topic ‘open all button’ is closed to new replies.