Hello,
I would like to create a page transition for when my site visitors switch between pages using my full page overlay menu. Currently, there is a sliding animation added to a hamburger menu icon which brings up the overlay menu but there is no page transition. I would like to have the same animation play in reverse to reveal the new selected page. Can anyone advise me on this?
You need to make an IX2 On Button Click for your transition event. I reccomend staying the same 'xāms you defined in the code for your transition. In this example, my transition sequence is 850ms.
Assign the button linkblock or textlinkblock the transition element trigger
apply ājavascript:delay(ā/page-path/pagrā) exactally as instructed in the link above.
@miekwave Wow, this looks a little above my pay grade Thank you for explaining it so well. Iām going to give it a try and Iāll come back here if something confuses me
Thanks for this. All the steps are pretty straight forward. I donāt know code at all and itās real easy to impliment. However, mine isnāt quite working. It only goes through part of my menu animation and doesnāt close the drawer. Thereās probably something in the build preventing this. Back to detective work
@thebergdesign
Practice it in a blank sandbox webflow project before implementing on your main project. This way you can mess arround until you understand how it works.
Thats what I always do, I have a sandbox project just for screwing arround until I learn exactally how things work, before putting it on a main project.
@ryang2723
Can you make a loom.com video or post screenshots of your error?
Hi @miekwave, I just finished with the guide as laid out in the Webflow Blog and itās working pretty well now. Iām missing where I need to implement your screenshots though?
One things Iāve noticed overall is that in the designer, the page links take me to either a 404 page or the about page of the Webflow website itself. Iāve published the site, and it works completely as intended there, with each link taking me to the correct page on my site - do you know why this is happening? I guess itās better that having it the other way around, but Iād like to be sure that it doesnāt lead to problems down the line. You can view it if you go to [https://the-berg-design.webflow.io]
Lastly, Iāve also noticed that the animations can run a bit choppy sometimes, it detracts from the quality of the website so Iād prefer if I could guarantee a smoother flow of the animations if possible. Are you aware of any solutions?
Thank you for your continued help, I appreciate it.
This is my sandbox project. Trying to experiment and troubleshoot to get things as close as possible and then rebuild it by referencing what Iāve done. I find that when people do a barebones version it doesnāt really address some of the complications that may arise. They are usually too simple to account for unforeseen design challenges.
I would reccomend converting your main menu to a symbol so its easier to apply to all pages.
Define class names and bind them in IX2.
(your designer navigation is a little confusing to me because of certain show/hide/x-y states, if youd explain click classes or sections are masks or not it would help diagnose better)
Designer preview mode using delay click
Links will not work with /.onclickDelay in designer view because your using relative link references, so it references {currentdomain}.com/{yourpage} within designer. So if you click it within webflow designer, it points to webflow.com/{yourpage}, if you click it from .io it will point to .io/{yourpage} and so forth.
SEO implications
Crawlers do not recognize onClick delay links. If you want those links crawled on the page, be sure to include them in the footer or some other content section as natural links.
Croppy Animation:
Please be more specific about what you mean by choppy animations.
https://the-berg-design.webflow.io/ Menu clicks pages seem to work for me and seamlessly transition. Though, there is an awkward load time between some pages, that can be addressed with a loading icon.
So I followed your steps above AND made my nav bar and menu drawer symbols and the nav animation works on both pages now. I for sure donāt understand why lol. Is it because I made them symbols OR is because I assigned the class to my Close Drawer? All part of the learning process I guess but itās def hard to know why things work the way they do when you donāt fully understand the code concept behind it.
There is also one other problem I am realizing. In order for the Delay Code to work you need to add the slug to the JS in the URL field. Your home page does not have a slug. So Work in my menu would essentially go back to my Home page but there is no way to enter a non-existing slug.
As far as the design navigation, you can chalk that up to I just donāt know what Iām doing at this point. And I guess I donāt know fully what you mean by āclick classes or sections are masksā. Sorry this must be frustrating for you.
In my IX2:
ā¢Drawer Open:
I have hide show for the close button (X) because I donāt want it to be visible in the initial state and I donāt want it to interfere with the three dots in any way. I think this may have been an artifact from when I had the close-menu-wrapper and dot-menu-wrapper as two different things, i.e. there was no menu-button-wrapper and both were contained in the Menu Wrapper as their own buttons essentially. This proved problematic in setting up the interactions and once I contained them in the menu-button-wrapper and assigned interactions only to that element (instead of to the dot and close buttons individually), everything work fine. Except for the problem we just remedied.
Iām basing this on some tutorials Iāve watched where the hamburger animates to an X but the elements are contained in a Div that triggers the animation. Iāve tried to recreate this but I have dots instead of lines so the animation isnāt as straight forward. (dots>X instead of lines>X)
I hope this makes sense, really sorry Iām not better versed in this. A lot of trial and error at this point.
Choppy animation is subject to opinion. As I mentioned earlier, it looks fine on my device, and it looks fine to me in yor screenshot, but thats my opinion. I would suggest experiementing with tweening curves, animation times, and offsets. such as ease-in vs ease-out or sine or other curves.
As far as portfolio loadingā¦ i reccomend creating a loading asset, for example one of these
and you can set up special onclickdelay and pageload init and page load complete rules for the loading icon
@miekwave Thank you for this, for some reason, the animations have mostly all smoothened out - I think I had too many tabs open on my system so it was running at max capacity. The portfolio page still loads too slowly so I will follow your suggestion of created a loading asset.
I have gone further and tried to add the page transition to the logo button at the top of the page, and the footer links to each page too, however the method you linked to at the top isnāt working for these elements. I think it has something to do with adding the code `javascript:delay(ā/ā) to these elements - it doesnāt work the same way as for the on-page elements. Do you have any suggestions?
This worked well, and smooth and nice.
I have one big problem - When using ābackā in a browser, the previous page gets shown with the outro animation Ā» in my case a fully blank page.
Do you happen to know of a way to (re)trigger something so that this works.
Ideally you want the ābackā command to really go back and (re-)open the page - including the outro-animation on the current page and the reloading/intro animation for the page in history youāre navigating towards.