Jump to content
Search Community

4bidden450

Members
  • Posts

    2
  • Joined

  • Last visited

4bidden450's Achievements

0

Reputation

  1. Thank you Carl. Cycle seems to be the answer, but I'm still having an issue. this.dataset is undefined in my code. Here is a pen that closely matches my code. The awesome (not!) part is that this.dataset works fine here. Why this.dataset is undefined in my code is obviously outside the scope of your support, but any high level things I should check?
  2. I have a container that has multiple elements wrapped in spans with a data attribute specifying the color in which it should fade to. I'd like to transition the color over 2 seconds, with a 0.5 seconds stagger between the elements. I may have 1 or I may have 100 elements to do. I've been banging my head against the desk for a while and I feel like I'm missing something simple. The issue arises with trying to use the individually specified color for each element. If I just had the array of elements all going to the same color I've figured that out. But I can't get it where each color is a variable. Each span is defined like: <span class="fadetext" data-fadeto="#ED8B00"> I've been through many iterations, but here is the most recent that does not work. var tl = new TimelineLite(); nextSection.find('.fadetext').each(function(index) { tl.staggerTo($(this), 2, {color: $(this).data('fadeto')}, 0.5); });
×
×
  • Create New...