question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some questions about Barba.js

See original GitHub issue

Hello !

I’m diving into Barba.js from 2 weeks, I really like it ! It’s fast and more reactive than my homemade system with Pjax.js ^^ I read the docs, I read a part of the source code and a lot of GtHub Issues/Questions.

However there are still some things I do not know how to do, or even how to start 😄 (I’m using it on Wordpress btw)

  • I defined a custom transition pagesTransition for every pages, it animates title / thumbnail and content with GSAP. But if I want to have a custom transition when i land on the “portfolio” page ? (I want thepagesTransition effects when i leave from any pages, and custom ones when i come to portfolio page). I Used your valid() logic from #19 but if i’m doing this, i have to copy the effects from pagesTransition to ToPortfolio transition ? I must doing something wrong 😄 This leads to my second question ^^

  • Can we share components between differents transition ? If i want to create a new custom transition to display a masonry, and i want to preload it. Can we have a component or method preloadImages shared between transitions ?

  • Finally, How do you manage the first full load from the pjax loads between pages ? (to init scrits). I mean, if i want the sames effects i set up in my transitions when i land on the site ?

That’s all 😄 Thanks for reading ^^ And thanks for Barba.js 👍

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
proovcommented, Jun 19, 2017

No problems 😃 thanks to take the time to answer 😄

Okay, Interesting, In your demos, you never call Barba.Pjax.start() I was wondering what it was for ^^. So if i put the pages GSAP effects in initStateChange or newPageReady, they will be rendered at the first load ? But after each page changed as well ? What do you recommend then ?

1reaction
proovcommented, Apr 24, 2018

It’s never too late @mikdlawregiets ! many thanks for the answer, i’ll give it a try 🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ - barba.js
FAQ. Frequently Asked Questions when starting using BarbaJS. ... How can I preload some images before loading the next page? How can I...
Read more >
Barba.js 101 - Premium Barba Tutorials - Ihatetomatoes
Have a few questions? No worries. · Can I download the videos and watch them offline? · What software do I need to...
Read more >
Having trouble using Barba.js and separate JS files
I just wrapped my other JS files code in a const runScripts = function () {} then called the function runScripts() inside a...
Read more >
Barba.js Tutorial - Syntax Part1 - YouTube
This is the third video of a series covering the version 2 of the Javascript library Barba. js.In this video, we're going to...
Read more >
Re: Is something like barba.js feasible in HubSpot?
Few questions / follow-up points: 1. With the above implementation of `barba.js` I have given, scripts that have a `src` work fine when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found