skrollr-menu icon indicating copy to clipboard operation
skrollr-menu copied to clipboard

Fixed-positioning and skrollr menu don't work together

Open fritoebola opened this issue 12 years ago • 8 comments

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

fritoebola avatar Dec 06 '13 10:12 fritoebola

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

Prinzhorn avatar Dec 07 '13 09:12 Prinzhorn

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

fritoebola avatar Dec 07 '13 14:12 fritoebola

Here's an example page

https://github.com/Prinzhorn/skrollr-menu/blob/master/index.html http://prinzhorn.github.io/skrollr-menu/

Prinzhorn avatar Dec 07 '13 18:12 Prinzhorn

@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.

twickstrom avatar Dec 27 '13 21:12 twickstrom

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

prismspecs avatar Jan 21 '14 00:01 prismspecs

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

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

Prinzhorn avatar Jan 21 '14 07:01 Prinzhorn

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.

Shadowstep33 avatar Apr 02 '14 19:04 Shadowstep33

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

fritoebola avatar Apr 03 '14 10:04 fritoebola