Why js does not work when switching between pages?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
52 views
Hi, I wrote this question, but this time decided to show it in greater detail:

Transitions between pages is not running javascript.
ie:
on the page index.html he initially works, but when going to another page it won't work.

I created for example 2 pages index.html and catalog.html
on both pages there is a script placed directly on the preview page (console - log)
dellakeramika.ru/synacs1/bag/index.html
What is the reason? help !!
by | 52 views

2 Answers

0 like 0 dislike
Because you have no real transition between pages. You are using some footy custom.js and plugins.js that make "beautiful" - change the url in the address bar and replace part of the page. And no transition.

And to get a more detailed answer, try really to expand the question to indicate that you got twisted up there and why.
by
0 like 0 dislike
In the comments of Vladimir Proskurin You already pointed out the reason.
View api plugin, which is responsible for a smooth transition. If it smoothState.jshe must have some method onAfter, which will be executed after loading new content(pages). Use it for the execution of Your code(for example on the plugin page)
by

Related questions

0 like 0 dislike
6 answers
0 like 0 dislike
3 answers
asked Apr 26, 2019 by Lyuba2018
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users