Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery Waypoints #260

Open
tomislavboric opened this issue Oct 4, 2016 · 3 comments
Open

jQuery Waypoints #260

tomislavboric opened this issue Oct 4, 2016 · 3 comments

Comments

@tomislavboric
Copy link

Hi,
just figured out, after few hours of troubleshooting - that Waypoints don't work when I use Slidebars page layout. Problem is that Waypoints can't trigger elements while scrolling. As soon as I removed div's that belongs to Slidebars it worked!

Is there some quick fix for that? Maybe some overflow..somewhere?

Thanks so much for any help

@apuntovanini
Copy link

+1 thanks

@JoryHogeveen
Copy link

Might be a CSS issue related to these topics:

#251
#257

@guyhamilton
Copy link

guyhamilton commented Nov 16, 2016

I believe this is due to the container setup Slidebar uses. Basically when scrolling the page you are not scrolling the body anymore, you are scrolling the canvas container. Due to this, waypoints and other plugins that target the body will stop working.

To get waypoints to work, you need to use 'context' (http://imakewebthings.com/waypoints/api/context-option/) to target the new container. I added the ID canvas to the canvas container and waypoints now works as it should.

var waypoint = new Waypoint({
element: document.getElementById('about'),
handler: function() {
console.log("reached!");
},
context: document.getElementById('canvas')
});

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

No branches or pull requests

4 participants