-
I'm trying to exclude links with class ".noswup" from swup by adding the selector in the options, but I get errors. Problem is that I can't add the data attribute data-no-swup to the specific element. I;m just adding a rule to the default link selector like this:
I thought this would be simplier but I can't figure out what's the right way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Update: since swup 3, you can use the ignoreVisit option to exclude links much more easily: const swup = new Swup({
ignoreVisit: (url, { el }) => el?.matches('.noswup, [data-no-swup]');
}) Previous answer for swup 2:
|
Beta Was this translation helpful? Give feedback.
Update: since swup 3, you can use the ignoreVisit option to exclude links much more easily:
Previous answer for swup 2: