Jump to content
Search Community

Forxs

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Forxs

  1. If I use call() the browser returns the error "Cannot tween a null target."
  2. So 'element' is just a jQuery DOM object. insertContent just pulls some information from that element and injects it into another element: function insertContent(element){ var infoContent = '<div class="image">'; infoContent += element.find('.headshot_alternate').html(); infoContent += '</div>'; infoContent += '<div class="name">'+element.find('.info .name').html()+'</div>'; infoContent += '<div class="position">'+element.find('.info .position').html()+'</div>'; infoContent += '<div class="bio">'+element.find('.info .bio').html()+'</div>'; $('.info-row .content').html(''); $('.info-row .content').html(infoContent); } So the variable infoContent is just building the new content for the container. Then it injects it into '.info-row .content'.
  3. I have this function: function changeInfo(element){ new TimelineMax(); tl = new TimelineMax(); tl.to('.info-row .content', 0.3, {opacity: 0}, 0) .add(insertContent(element)) .to('.info-row .content', 0.3, {opacity: 1}, 0.6) //insertContent(element); } Which is fading out some content, run a function to insert the new content, and then fade in the new content. The browser is returning "Uncaught Cannot add undefined into the timeline; it is not a tween, timeline, function, or string." If I comment out the timeline and just run insertContent(element); it works fine (all be it without the animation obviously). Any idea what I can do to fix this? Cheers,
×
×
  • Create New...