Comments (6)
Holy hell I forgot to remove this one :/
Thanks for the help and sorry for the loss of time ^^
Cheers !
from barba.
Hi @arnaud-xp !
Thanks for using Barba.js!
this.newContainer
element is by default as visibility: hidden
.
You can check the documentation for more information.
So, just changing your code to:
$(this.newContainer).css({
opacity: 0,
visibility: 'visible'
});
Should work :)
Feel free to close the ticket if the problem is solved
from barba.
Hi @luruke !
I just made the change but the problem stays the same :/
Any other clue ?
Cheers !
from barba.
Are you sure?
I just tested the Transition and it works fine.
Just to be clear, the final code should be something like:
var AwesomeTransition = Barba.BaseTransition.extend({
start: function () {
Promise
.all([
this.newContainerLoading,
this.fadeOut()
])
.then(this.fadeIn.bind(this));
},
fadeIn: function () {
var _this = this;
$(this.oldContainer).hide();
$(this.newContainer).css({
opacity: 0,
visibility: 'visible'
});
$(this.newContainer).animate({opacity: 1}, 750, function () {
_this.done();
});
},
fadeOut: function () {
return $(this.oldContainer).animate({opacity: 0}, 750).promise();
}
});
If the problem persist, try to check if you may have some CSS rule that interfere, or try to post a working example somewhere.
Cheers
from barba.
Hey again !
I double checked your code, we have the same thing. I didn't found any css rules interfering but if you want to have a look, check here => http://350bf6a3.ngrok.io/
Click on menu and then switch pages by clicking on the logo or on the link "A propos"
Cheers !
from barba.
Hey again
You have a nice CSS rule:
* {
transition: all ease 0.3s;
}
Not only this is a performance killer, but also means that every time jQuery update the opacity tween there is a css transition on it.
Removing solve it.
Let me know if it works
from barba.
Related Issues (20)
- Improve documentation for WordPress HOT 2
- How to add/initialize other JS files after the page transition which is built with barba & gsap? HOT 2
- How to create transition sliding up card? HOT 1
- `RangeError` on manual hash change
- How to check for barbacontainer HOT 1
- Safari flash the leaving container HOT 6
- Add support for multiple `namespace` in `Views`
- Improve `next.container` availability
- About `View` transitions API HOT 3
- POST Form transition HOT 1
- Source map failed to load HOT 3
- Compiling error HOT 1
- Disable `prefetch` on specific links HOT 1
- Maintain element on transition HOT 1
- Typescript issue with documentation example HOT 1
- Page content is duplicated when opened HOT 1
- CSP violation from parseFromString HOT 1
- Back button not working as intended after clicking anywhere on the page HOT 4
- Improve Google Analytics guide in the documentation
- Change the wrapper/container on the fly? HOT 3
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 barba.