• Resolved albertopixel

    (@albertopixel)


    It seems that the collapsing is not working.

    <div class="sya_container" id="sya_container">
    <a id="year2019"></a>
    <a href="#" onclick="this.parentNode.nextSibling.style.display=(this.parentNode.nextSibling.style.display!='none'?'none':'');return false;">2019</a> 
    <span class="sya_yearcount">(5)</span>
    <ul style="display:none;">
    </ul>
    </div>

    The javascript code that the plugin is using is:

    this.parentNode.nextSibling.style.display=(this.parentNode.nextSibling.style.display!='none'?'none':'');return false;

    but the elements are on the same level so parentNode will fail and moreover if you enable the article count the nextSibling will be the count.

    Solution

    If with every options of the plugin the div of the articles it’s always the last in the html the solution could be:

    this.parentNode.lastChild.style.display=(this.parentNode.lastChild.style.display!='none'?'none':'');return false;

    Of course would be better use a class maybe…

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

    (@alphawolf)

    Hi albertopixel, thanks!

    Another decent solution would be to enter HTML header tags like <h2> | </h2> to the plugin setting “Before / After (Year headline)” which will also have positive effects on your content SEO-wise.

Viewing 1 replies (of 1 total)
  • The topic ‘Collapsing Year not working’ is closed to new replies.