Jump to content
Search Community

scrollTo Plugin with Isotope JS

Laurie test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi, 

 

I'm Laurie, and i'm a new member in the GSAP community. 

I work on my own photography website, et i'm trying to create something but I'm pretty lost. So, I decided to create a topic here, if someone could send me some help ?

 

So, in my website, I have an index where i have 2 links in the main menu : t

- A simple link which scrolls to  the isotope section (that's ok, it works! :D )

- A difficult link where I wanted to create a scroll and the filter (but i really don't know how to do that...). I mean, when I click to the second link, i would like to scroll and have the filter at the same time. 

 

( Of course, this pen is not my website. I would like to create a website with many pages, with the main menu. )

 

Perhaps it's not possible, or I don't know. That's why I post my problem on this forum.

 

The CodePen :

 

 

Thanks a lot in advance.

 

Laurie

 

 

 

 

 

 

See the Pen BEOpRp by LaurieVince (@LaurieVince) on CodePen

Link to comment
Share on other sites

The problem is you're asking jQuery to calculate the offset.top() of "#isotope?filter=.couleur" and that is producing an error.

 

You don't really need to calculate the offset for the scrollTo plugin to work. You can use the div ID like this in your click handler.

 

    TweenMax.to(window, 1, {
        scrollTo:{
            y: "#isotope", 
            autoKill: true
        }, 
        ease:Power3.easeOut 
     });

 

Then you'd need to check the filter associated with the clicked button (if it has one) and apply that to the group of photos. I don't know anything about isotope so you'll have to work on that or ask over in their support area. If you have any GSAP related questions, we're happy to help.

 

Happy tweening.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...