Collapsing Year not working
-
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)
Viewing 1 replies (of 1 total)
- The topic ‘Collapsing Year not working’ is closed to new replies.