N
N
Nikita Nafranets2016-05-08 02:15:49
JavaScript
Nikita Nafranets, 2016-05-08 02:15:49

How to make an animated page transition?

There are 4 main pages, you need to hang a transition on them like here
tympanus.net/Development/PageTransitions (move animations)
Unfortunately, the lesson does not teach how to enable ajax and do it with pages, not containers.
Played around with smoothState.js , hooked up the slideRight + slideLeft animation. It looked similar, but there is a huge white strip between the transition. I came to the conclusion that content substitution is not enough, you need to load two pages at once in advance so that the transition is possible, but unfortunately I did not find a way to do it there.
I put the site on modx. How to do it? What to do? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
devstudent, 2016-05-08
@devstudent

why not put everything in one html, so that each page is a screen-high block, and then you can do an animated scroll instead of moving to another page

Z
zooks, 2016-05-08
@zooks

I agree with the user above, you need to display all resources on the main page using pdoResources.
And then you can already do any animation. But for SEO, of course, it will be worse than pagination.

S
Sergey Volkov, 2016-05-08
@format1981

If a new page is formed from the data received by ajax request, then before starting the transition animation, you need to prepare a new page: get the data with Ajax, form a new page in a separate block, start the transition animation. After that, you may have to erase the block with the previous page.
Such transitions are easier to do in single-page web applications.
Another difficulty may arise with some elements that are common to both pages (header, sidebar, ...).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question