Closed bradleyDouglas closed 5 years ago
I haven't used Swup, but I saw Swup's document. You solve the problem by binding both the DOMContentLoaded and swup:contentReplaced or swup:animationInDone events?
document.addEventListener('DOMContentLoaded', event => {
luxy.init();
});
document.addEventListener('swup:contentReplaced', event => {
luxy.init();
});
Yeah, that's what I implemented and it works great. Was just wondering if there was maybe a way to just update the targets, but it works fine this way.
Thanks! I'm currently using Luxy on two sites and I'm loving it.
Thank you for using. I will try to make it better. Closed this issue, as solved the problem.
I haven't used Swup, but I saw Swup's document. You solve the problem by binding both the DOMContentLoaded and swup:contentReplaced or swup:animationInDone events?
document.addEventListener('DOMContentLoaded', event => { luxy.init(); }); document.addEventListener('swup:contentReplaced', event => { luxy.init(); });
It didnt work for me, any idea why?
Hello.
I'm currently using Luxy in combination with SWUP. I'm trying to figure out what the best approach is for updating Luxy Targets on a new PJAX Page load. Currently, my home page (or whatever page is loaded first) works as expected and the 'luxy-el' have a nice parallax effect to them. However, when I navigate to another page, the 'luxy-el' don't update.
Is it as simple as re-initializing Luxy on each load or is there a better approach to just updating the Targets?
Thanks!