this is my first time using swup js with the js plugin. https://swup.js.org/plugins/js-plugin
I can see that the trigger to go to the clicked page lies inside the object array of options.
My question is there anyway I can trigger the "next" from external function
const options = [
{
from: '(.*)',
to: '(.*)',
in: function(next) {
document.querySelector('#swup').style.opacity = 0;
TweenLite.to(document.querySelector('#swup'), 0.5, {
opacity: 1,
onComplete: next
});
},
out: (next) => {
document.querySelector('#swup').style.opacity = 1;
TweenLite.to(document.querySelector('#swup'), 0.5, {
opacity: 0,
onComplete: next
});
}
}
];
const swup = new Swup({
plugins: [new SwupJsPlugin(options)]
});
how do I trigger the "next " from another outside function not within Const options?
for example
counts trigger = function(){
options.next();
thanks
this doesn't work
thanks