Code Monkey home page Code Monkey logo

Comments (8)

gmrchk avatar gmrchk commented on July 22, 2024

Hey there,
everything works just fine for me. Maybe this could help?

from swup.

loup-brun avatar loup-brun commented on July 22, 2024

Ahh I ran through the docs too quickly – the class attribute must begin with a-fade. It's not instantly intuitive since it is common to have multiple classes on an element and their order doesn't usually matter.

Anyway, thanks for the help!

from swup.

gmrchk avatar gmrchk commented on July 22, 2024

You're not the first one to miss this. I will update the docs to make it more clear.
Cheers!

from swup.

AdventurouslySocial avatar AdventurouslySocial commented on July 22, 2024

Either solution of utilizing "a-fade" as the only class or the first class of many assigned to an element does not solve the problem for me.

MY INSTALLATION INFO:
I have Swup installed and enabled on a fresh local machine installation of Wordpress. There are only one other plugin installed which is 'Code Snippets'. Outside of this one exception - wordpress is completely stock.

MY OBSERVABLE BEHAVIOR:
The css transition out and transition in works once upon initial fresh page load. The second time any link is clicked the css transition out plays half way through then abruptly begins the transition in of new content. On all following link clicks the currently displayed page immediately cuts away and the new content gracefully transitions in.

I've tried many solutions offered in various threads here and on other sites with no successfully working solution.

Any assistance is greatly appreciated.

from swup.

gmrchk avatar gmrchk commented on July 22, 2024

Hi @AdventurouslySocial

This sounds like swup doesn't register any elements to wait for on some pages. Could you provide a live demo or your code?

Also, the default option of animation selector has been changed since this issue was created (be sure to use the latest version of swup).

from swup.

AdventurouslySocial avatar AdventurouslySocial commented on July 22, 2024

This is the structure of the pages transitioning to one another. This is just the pseudo code where anything swup related appears.

head
    <script src='https://eventjoy.dream.press/wp-content/swup/dist/swup.js'/></script>
/head

body

    section data-id="5b0a5b7" class="elementor-element elementor-element-5b0a5b7 a-fade elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" id="swup" data-element_type="section"

        TEXT
        BR/
        NAV BUTTON TO NEXT SWUP PAGE WITH IDENTICAL STRUCTURE

    /section


script
--
  | function domReady(callback) {
  | document.readyState === "interactive" \|\| document.readyState === "complete" ? callback() : document.addEventListener("DOMContentLoaded", callback);
  | };
  | domReady(function() {
  | const domain = window.location.origin
  |  
  | const swup = new Swup({
  | LINK_SELECTOR: `a[href*="${domain}"]:not([data-no-swup]), a[href^="/"]:not([data-no-swup]), a[href^="#"]:not([data-no-swup]), a[xlink\\:href]`,
  | })
  |  
  |  
  |  
  |  
  | });
  |  
  | </script>
  
/BODY

from swup.

gmrchk avatar gmrchk commented on July 22, 2024

As I mentioned, the default option of animation selector has been changed since this issue was created. I'm not sure what version of swup you're running, so please, update to the latest version.

Then use transition-fade class instead of a-fade class in your HTML and styles.

from swup.

AdventurouslySocial avatar AdventurouslySocial commented on July 22, 2024

The version of Swup I am using is the most current one available. I first tried using transition-fade when I began because that is what is documented - the effect was that nothing happened. I only got it to work when I began using a-fade.

Here is a live-link to the problem that as it is occurring.
https://eventjoy.dream.press/aswup1/

  • You'll notice the failure to transition out after one or two iterations.
  • You'll notice the css styling disappearing for all but the initially loaded page (which I assume is remedied by the mergehead plugin.)

from swup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.