Menu
Hello, how can I add the “data-no-swup” attribute to all links on the page on JS?
Except for links that have a class “active”!
Example:
This
`<a href=”#”>01</a>
<a class=”active” href=”#”>01</a>
<a href=”#”>01</a>
<a href=”#”>01</a>
`
To This
`<a data-no-swup href=”#”>01</a>
<a class=”active” href=”#”>01</a>
<a data-no-swup href=”#”>01</a>
<a data-no-swup href=”#”>01</a>
`
Thanks!