Jump to content
Search Community

anthonyhonciano

Members
  • Posts

    1
  • Joined

  • Last visited

anthonyhonciano's Achievements

0

Reputation

  1. HI All, Loving this plugin, it works, but it always starts back to the top and scrolls to the new position. What am I doing wrong? I tried using TweenMax.set, but that doesn't do anything. Here's my code. In general, I have a dynamically created list with links. The links have top coordinates for the article on the page. The click script reads that position attribute in the anchor tag and scrolls to the new position. It's just that window will always start at zero position. _this = $(this); _position = parseInt(_this.attr("position")); //gets position attribute from clicked anchor tag _curPosition = $(window).scrollTop(); //get windows current position TweenMax.set(window,{ scrollTop: _curPosition }) TweenMax.to(window, 2, { scrollTo: {y: _position}, ease: Power3.easeInOut })
×
×
  • Create New...