Problems with events #83
Unanswered
wdmarketLV
asked this question in
1. Help
Replies: 1 comment
-
Firstly, this is how the web is working. The click on the link with the URL will trigger a page reload if no one interrupts the process. When scripts are not loaded yet, clicking the link will open the page. Secondly, your custom scripts should be updated to work well after turbolinks navigation. To do so, use Here is an example: // document listeners preserved between turbo navigation
$(document).on('click', '.selector', () => console.log('click1'));
// el listeners don't preserved between turbo navigation, so we need to re-apply them on each breeze:load event
$(document).on('breeze:load', () => {
$('.selector').on('click', () => console.log('click2'));
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
On the website http://dssriga.wdmarket.technology/ second navigation on toggle problem.
It is not just nav, but it is events.
it works but sometimes doesn't work, for example, if the page is still loading and the user clicks on some element sometimes it can doesn't work
it's working, but sometimes doesn't listen to events, but that is mainly when the page is loading
events -> events
Beta Was this translation helpful? Give feedback.
All reactions