Jump to content
Search Community

David Rhoden

Members
  • Posts

    4
  • Joined

  • Last visited

David Rhoden's Achievements

  1. Ah....you found me out. It needs to be article.class5 (no space), AND I also had to put class="class5" in the HTML...thanks. You've been very helpful. It's working now.
  2. Got back null. I'm writing that selector wrong. (Thanks for answering my question, very helpful.) But also: I tried just hard-coding a selector that I know exists (article class5) and still got scrollTo target doesn't exist. Does scrollTo maybe only work with an ID?
  3. Thanks, that's exactly what I'm looking for (what I'm feeding into the tween, specifically what scrollTo target value is expected) but my code doesn't have asections array like the above example, so I'll have to figure out something else. I just have gsap.to(window, {duration: 1, scrollTo:"article class" + (index + 1)}); and then in the HTML a series of articles with incremented classes, like "article class1, article class2", etc. My classes are there in the HTML. Maybe I wrote that scrollTo value in a non-working way. I'll see what I can do about a demo.
  4. If you wanted to console.log the scrollTo target, how would you do it? I'm getting this error, but I'm pretty sure the target _does_ exist. I want to see what gsap _thinks_ the scrollTo target is.
×
×
  • Create New...