• Hi there,

    We have a few websites that are now experiencing problems recently, where the nested accordion won’t stay open, but only on the first instance on the page. See example website, where none of the Super Special > FAQs for Specials internal accordions will stay open, or sometimes it will open one of the other nested accordions.

    Any of the same FAQs on the same page work correctly, it’s always just the first instance of it.

    What I’ve tried:
    – JavaScript is not minified
    – Cleared all caches
    – If I add another Super Special, the second one works correctly but again the first does not.
    – I’ve pulled out the code for this accordion specifically onto a test page with nothing else on it, and it does the same thing, even if it is the only accordion on that page.

    Below is the exact code

    <div><strong id="idx3001" class="collapseomatic " tabindex="0" title="Click to expand FAQs">FAQs for Our Crazy Deals</strong>
    <p>?</p>
    <div id="target-idx'.$f.'" class="collapseomatic_content ">
    <ul>
    <li><span id="id9976" class="collapseomatic " tabindex="0">If I click the 'Claim' button am I then obligated to purchase it?</span>
    <div id="target-id9976" class="collapseomatic_content " style="display: none;">No, you're not locked in in any way. We'll come to view your desired heat pump location. You can ask as many questions as you like. If, for whatever reason, you do not wish to complete the purchase, that is fine.
    <p>?</p>
    <p>There may be additional mileage and labour fees for installs outside the <a href="https://www.coolair.nz/timaru/"> Timaru </a> area. If these are applicable we will always discuss these with you first, so you can claim this deal today without being locked in to the purchase if you wish to change your mind.</p>
    </div>
    </li>
    <li><span id="id7044" class="collapseomatic" tabindex="0">What if the installation is more complicated than you expect?</span>
    <div id="target-id7044" class="collapseomatic_content " style="display: none;">Our special price includes <a href="https://www.coolair.nz/wp-content/uploads/Back-to-back-explanation.pdf" onclick="__gaTracker('send', 'event', 'download', 'https://www.coolair.nz/wp-content/uploads/Back-to-back-explanation.pdf');" target="_blank" rel="noopener">back-to-back installation</a>. If the outdoor heat pump unit needs to be further away than specified in the back-to-back layout the installation will cost slightly more. We will be able to tell you exactly how much the total will be after viewing the installation location. You only commit to purchasing the heat pump after receiving this final quote.</div>
    </li>
    <li><span id="id7430" class="collapseomatic" tabindex="0">How is the RRP calculated?</span>
    <div id="target-id7430" class="collapseomatic_content " style="display: none;">The Recommended Retail Price (RRP) shown is the fully-installed RRP. This is calculated as the heat pump price specified by the manufacturer or used by well-known retailers, plus $800 for installation costs. A non-installed heat pump won't do the job! So our prices always include installation.</div>
    </li>
    <li><span id="id950" class="collapseomatic" tabindex="0">What areas are these deals available in?</span>
    <div id="target-id950" class="collapseomatic_content " style="display: none;">These specials are available throughout <a href="https://www.coolair.nz/"> South Canterbury</a>, including <a href="https://www.coolair.nz/ashburton/"> Ashburton</a>, Geraldine, <a href="https://www.coolair.nz/timaru/"> Timaru</a>, Waimate, Oamaru, Fairlie through to Twizel and the Waitaki District.
    <p>?</p>
    <p>There may be additional mileage and labour fees for installs outside the Timaru area. If these are applicable we will always discuss these with you before you commit to the purchase. You can claim this deal today without being locked in to the purchase if you wish to change your mind for any reason.?</p>
    </div>
    </li>
    </ul>
    </div>
    </div>
    <p>?</p>

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter luphuza

    (@luphuza)

    No help?

    Plugin Author twinpictures

    (@twinpictures)

    Below is the exact code

    is this the code you are using, or the code being generated?

    This also needs to be clarified:

    id=”target-idx’.$f.'”

    It seems that a PHP variable is being incorrectly injected within HTML. Please explain.

    Is the code being generated by shortcode, or is the roll-your-own method being used? From the description, it seems that many collapse elements are being placed on a single page using a shortcode, but the ID is not being defined. If no ID is provided, then the plugin will assign a random ID, however with many elements, there is a chance that an ID will be used more than once.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Nested accordions won’t stay open’ is closed to new replies.