Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

Fixed-positioning and skrollr menu don't work together #29

Open
fritoebola opened this issue Dec 6, 2013 · 8 comments
Open

Fixed-positioning and skrollr menu don't work together #29

fritoebola opened this issue Dec 6, 2013 · 8 comments

Comments

@fritoebola
Copy link

So I have a page based on the The "main" example, and as I did not want a continue scroll but stopping at some point to do animations etc I am using the css fixed-positioning.css..

It all works nicely but having the fixed positions makes the skrollr-menu to stop working as it does when not using fixed-positioning.css.

It makes my menu items to scroll to half of the items or no scroll the page at all, or just a portion.... you have to click the menu item few times before this gets the anchor link to the top
any idea how to solve this?

Thanks a lot

@Prinzhorn
Copy link
Owner

If I understand you correctly, that's what data-menu-top is for.

@fritoebola
Copy link
Author

Hi Alexander,

I'm severally confused, I am not sure how to use the data-menu-top.... could you point me into an example? It might be that i'm not implementing this right and that this is not an issue.

Thanks

@Prinzhorn
Copy link
Owner

@twickstrom
Copy link

@fritoebola I was experiencing the exact same issues as you.

Like @Prinzhorn says if you add data-menu-top="325p"
Accommodations

it will scroll 350% down the page. You will want that to match your last data-???p sequence on your container you are scrolling to.

For instance on my page I have the following:

So i want my data-menu-top attribute from the link to match transform:translate(0,0%) so it is set to 325p.

@prismspecs
Copy link

data-menu-top is either broken or has no example

@Prinzhorn
Copy link
Owner

data-menu-top is either broken or has no example

http://prinzhorn.github.io/skrollr-menu/

@Shadowstep33
Copy link

Sorry that this is late @fritoebola but the way I managed to get around this issue was using

                var s = skrollr.init({
                    edgeStrategy: 'reset'
                });

Using the reset causes the element to revert back to it's original position: relative/static/absolute/whatever before the first keyframe and after the last. There is still some slight odd behavior (such as you described) when it comes to going to adjacent slides or clicking the menu item for the slide it is currently on. Will report back when I figure out how to fix that.

@fritoebola
Copy link
Author

Well, a good tip is never late. We can all always use this on future projects.
Cheers
P.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants