Support » Plugin: Collapsing Archives » Wait for window load to addExpandCollapse()

  • Hello,

    I have moved my jQuery to the footer of my website to eliminate render-blocking scripts, but that causes your expanding archives plugin to fail. A simple fix is to add an eventlistener to window.load, in lines 141-142 in your plugin file collapsArch.php:

    echo "window.addEventListener('load',function(){addExpandCollapse('widget-collapsarch-$number-top'," .
       "'$expandSym', '$collapseSym', " . $accordion . ");},false);";

    https://wordpress.org/plugins/collapsing-archives/

  • The topic ‘Wait for window load to addExpandCollapse()’ is closed to new replies.