Comments (8)
I don't mean to butt in but I like the convention of including the word swup in the animationSelector
by default. I was just thinking about this as I noticed you updated the README with the latest animationSelector
example.
from swup.
@thetoine No worries. I was just updating the docs, so I updated the default options in a process so it all fits. Thanks for making me do so!
@dylanfisher transition-*
seems pretty descriptive to me, and in case it's overlapping with some internal classes, it's still a default setting that can be changed. Any suggestion including word swup tho? I like the idea, but swup-transition-*
is unnecessarily long and versions like swup-a-*
seems like something that could be confusing for people.
from swup.
Hi Thetoine,
For first question see this #4
For second question, and also the first, you can adjust manually the default option like this:
var options = {
LINK_SELECTOR: 'a', //HERE
FORM_SELECTOR: 'form[data-swup-form]',
elements: [
'#swup'
],
animationSelector: '[class^="a-transition-"]', //HERE
cache: true,
pageClassPrefix: '',
scroll: true,
debugMode: false,
preload: true,
support: true,
disableIE: false,
skipPopStateHandling: function(event){
if (event.state && event.state.source == "swup") {
return false;
}
return true;
},
}
var swup = new Swup(options) //HERE
Hope this help
from swup.
Hi @thetoine,
The LINK_SELECTOR
default setting was once pointed out before. I'm all up for it.
I like the idea about animationSelector
option. People are having a hard time understanding the meaning of class^=
, or just miss it quite often. I was thinking about including the word swup in the selector, but I guess [class*="transition-"]
would do just fine. After all, it's a setting that can be changed... It would be nice if you reflect your changes in the readme as well, but I will go through it when you're done anyway, so it's up to you.
Thanks!
from swup.
just wanted to thank @thetoine for his solution which worked great for me. Thanks!
from swup.
Hi @thetoine, any news on this?
from swup.
@gmrchk sorry, I was way too busy last week on clients job. So you did the change yourself, great !
from swup.
Hey guys, wanted to check in with some other people who might have implemented this in WP.
I was looking at adding a Webpack plugin for in-lining my critical path CSS, and it was not able to work because it couldn't access any HTML files. I'm wondering if that means that the preload for swup isn't going to work for wp? I'm continuing to use it because I think the animation stuff is useful but I'm curious how useful it actually is for the actual preloading of data etc. Any thoughts?
from swup.
Related Issues (20)
- Think about chances for optimizations when clicking a link during a visit HOT 9
- Suggest changes to this page links from the Documentation result in a 404 on GitHub HOT 1
- Rethink tests setup for official plugins HOT 5
- pageA goto pageB; but,with diffrent link style; when back to PageA,the links style is losted
- [Bug]: Undefined link href on Safari 13.1 and lower HOT 10
- [Feature Request]: Add way to easily listen to ALL hook events HOT 3
- [Feature Request]: Expose AbortController to be able abort request programmatically HOT 20
- Feature: Allow aborting running visits HOT 1
- Ignore errors in user hooks HOT 1
- Importing helpers from CDN module HOT 2
- History navigation ignored when using custom link selector HOT 5
- [Bug]: URL in `visit:start` inconsistent between normal and history visits HOT 4
- Feature: Store parsed html document in visit object HOT 11
- [Solved]: New values in <head> are not updated HOT 2
- [Bug]: [data-swup-ignore-script] issue with Contact Form 7 in Wordpress HOT 4
- Implement tests for official plugins
- [Feature Request]: Add drop-in attribute to swap/replace content of elements outside the swup container HOT 4
- Slim down core
- [Idea]: New plugin for all route-related stuff HOT 1
- [Idea]: Put core plugins inside swup's main repo HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swup.