How can I trigger "page ready" via jQuery?
Moved
Unsolved
NodeBB Development
-
Hey!
I have some jQuery scripts on my theme which works fine.
But if I reload the page via the refresh button, the script doesn't load.
currently I am using:
$(document).ready(function() { //CODE }
Which is fine if I click inside the forum. But when I try to reach the direct URL, the script does not execute. As well (as meantioned) If i reload the page.
I tried it with the following listeners:
$(window).on('action:ajaxify.end', function(event, data) { //CODE }); $(window).on('action:ajaxify.dataLoaded', function(event, data) { //CODE }); $(window).on('action:posts.loaded', function(event, data) { //CODE });
Same probem. If I reload the page, it doesn't work. If I call the URL directly, it doesn't work.
If I surf inside the forum, it works.
Whats the problem?
Copyright © 2024 NodeBB | Contributors