$(document).ready functions not being fired after navigating with the sidebar #4374
Unanswered
guillaume-ion
asked this question in
Q&A
Replies: 1 comment 1 reply
-
this is how SPA works: only the. first page load triggers that event, but history.push("/new/path") does not trigger it. Look at our Google analytics plugin and client modules to understand how you can listen for such navigation events, but you can also listen for the history events like https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a script on all my pages that are supposed to fire when
$(document).ready
However, it works once when navigating to a page but not for subsequent clicks on sidebar links.
Only when refreshing the page does the script fires.
How can I make sure my script runs every time a page is displayed?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions