Support » Plugin: Collapsing Archives » Javascript include is buggy

  • If you have two of your widgets at the same time but displayed on different pages, then the JavaScript is NOT included. This breaks the expanding. Since you’re using include_once(), it is including the JavaScript for the first widget which is not displayed (or rendered at all). So when the second widget comes around, it doesn’t get the JavaScript and breaks. You need to switch from using include_once() to include a JavaScript file. That’s not really what it’s for and is a bit of a hack. For the time being, I had to edit your plugin to just do include() so it would work. But your next update will remove my fix. Please use enqueue_script or something more reliable. Thanks

  • The topic ‘Javascript include is buggy’ is closed to new replies.