Jump to content
Search Community

mcnab

Members
  • Posts

    1
  • Joined

  • Last visited

mcnab's Achievements

1

Reputation

  1. Just chiming in - this answer helped me solve a problem I had running Greensock in Magento CE1.x. As Magento uses Prototype you have to run jQuery in noConflict mode. This caused the; Error on a MorphSVG (v0.8.4) but it also caused an error using TweenLite, in my case; Basically the same reason in both cases, which was that I was using the div id directly. By assigning it to a variable first it started working. So this; TweenLite.set("#logosvg", {onComplete:logoComplete}); Doesn't work but this did work; var logosvg = document.getElementById("logosvg"); TweenLite.set(logosvg, {onComplete:logoComplete}); And this doesn't work; var tl1 = new TimelineLite({}); tl1.to(twitterCircle, 0.4, {morphSVG:"#twitter-social-icon", fill:"#000"}, "+=1") But this does; var tl1 = new TimelineLite({}); var twitterSocial = document.getElementById("twitter-social-icon"); tl1.to(twitterCircle, 0.4, {morphSVG:{shape:twitterSocial}, fill:"#000"}, "+=1") Note that in both cases the code all worked fine in the flat HTML/CSS/JS static site I did the frontend in. It only failed once I'd put it into Magento and applied noConflict mode. For info I'm using an older version of jQuery (1.11.1), it may be that. Hope this helps, Cheers, Robbie
×
×
  • Create New...