Share Posted January 26, 2016 Hi, First SVG morph I have done so far and I am trying to do the infamous morph from open menu bars icon to the close menu icon. Open Menu Icon consists of three paths. 1) #open_top_bar --> morphs into #close_top_bar 2) #open_middle_bar --> autoAlpha to 0 3) #open_bottom_bar --> morphs into #close_bottom_bar Getting some errors in my console I don't understand that results in no morphing. Uncaught TypeError: Cannot read property 'toUpperCase' of undefined Doesn't give me a line number but I assume one or more of my selectors is returning null? See the Pen eJMLrr by jstafford (@jstafford) on CodePen Link to comment Share on other sites More sharing options...
Share Posted January 26, 2016 If you switch this: tl = new TimelineMax(); tl.to($("#open_top_bar"), 1, {morphSVG:$("#close_top_bar")}, "+=1") tl.to($("#open_middle_bar"), 1, {autoAlpha: 0}, "+=1") tl.to($("#open_bottom_bar"), 1, {morphSVG:$("#close_bottom_bar")}, "+=1") to this: tl = new TimelineMax(); tl.to("#open_top_bar", 1, {morphSVG:"#close_top_bar"},0) tl.to("#open_middle_bar", 1, {autoAlpha: 0}, 0) tl.to("#open_bottom_bar", 1, {morphSVG:"#close_bottom_bar"}, 0); everything is working just fine. 2 Link to comment Share on other sites More sharing options...
Author Share Posted January 26, 2016 Thanks PointC! I appreciate it. Link to comment Share on other sites More sharing options...
Share Posted January 27, 2016 Yep, it had to do with the jQuery wrapper(s). We'll add some code to the next version to work around that. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now