lukehaas / Scrollify

A jQuery plugin that assists scrolling and snaps to sections.
MIT License
1.81k stars 577 forks source link

How to include scrollify on more than one page? #328

Closed frontenddevguy closed 6 years ago

frontenddevguy commented 6 years ago

I need to target specific classes on 2 different pages. At the moment the 2nd instance is causing the first one to not work. I couldn't see in the documentation how this is supposed to be written?

Something like:

jQuery.scrollify({ section : ".page-template-home ._home-section", interstitialSection : ".page-template-home footer#colophon", // easing: "easeOutExpo", section : ".page-template-event ._home-section", interstitialSection : ".page-template-event footer#colophon", // easing: "easeOutExpo", scrollSpeed: 1500, });

lukehaas commented 6 years ago

You'll just need a comma between the class names: section : ".page-template-home, ._home-section"

frontenddevguy commented 6 years ago

That's great, thank you!