admin管理员组文章数量:1023848
Trying to make a plugin in javascript. The code is working fine except the scroll event which only fires when I'm logged in Wordpress.
The rest of the code (hopefully all) is working as it should when I'm logged out (or in a new session from an incognito window) but this just won't fire up. Why is that?
I'm trying something like this:
document.addEventListener('scroll', function() {
if (window.scrollY > 250) {
run();
}
});
Trying to make a plugin in javascript. The code is working fine except the scroll event which only fires when I'm logged in Wordpress.
The rest of the code (hopefully all) is working as it should when I'm logged out (or in a new session from an incognito window) but this just won't fire up. Why is that?
I'm trying something like this:
document.addEventListener('scroll', function() {
if (window.scrollY > 250) {
run();
}
});
本文标签: plugin developmentJavascript scroll eventHandler only working when I39m logged in in Wordpress
版权声明:本文标题:plugin development - Javascript scroll eventHandler only working when I'm logged in in Wordpress 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745579043a2157197.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论