Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/docs/options/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,20 @@ const swup = new Swup({

The selector for detecting animation timing. Swup will wait for all CSS transitions and
keyframe animations to finish on these elements before swapping in the content of the new page.
The default option will select all elements with class names beginning in `transition-`.
The default option will select all elements with class names containing `transition-`.

```javascript
{
animationSelector: '[class*="transition-"]'
}
```

> [!NOTE] Note about class matching
> Technically, the `*=` comparison in the selector will include classes containing the
> pattern at any position, such as `my-transition-class`. To avoid this, consider using a stricter
> selector, e.g. `class^="transition-"]` which would require the transition class to come at the
> beginning of the class attribute, or `class~="transition-fade"` to target a specific transition class.

## animationScope

The elements on which swup will add the [animation classes](/getting-started/how-it-works/#animation-classes)
Expand Down