simplesolution
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by simplesolution
-
-
I'm testing green sock in WordPress. ( beginner)
error : Uncaught Cannot tween a null target
-----------------------------------------------------------------
// curve moving bezier
TweenMax.to(document.getElementById("box1"), 6, {
type:"soft",
bezier:[
{left:100, top:250},
{left:600, top:0},
{left:300, top:100}
], ease:Power1.easeInOut, repeat: -1, yoyo: true
});
----------------------------------------------------------------------> this code makes above error.
I didn't find the solution yet.
Uncaught Cannot tween a null target
in GSAP
Posted
I found the problem.
As your advice, I removed all code and made simple.
and then, I checked one by one.
If I removed below code, Everything is ok.
// curve moving bezier
jQuery(document).ready(function(){
TweenMax.to(document.getElementById("box1"), 6, {
type:"soft",
bezier:[
{left:100, top:250},
{left:600, top:0},
{left:300, top:100}
], ease:Power1.easeInOut, repeat: -1, yoyo: true
});
});
This code is fine in home. It works well.
but In the other page,
If I removed html markup(for above code), It made some error.
See the Pen xxKJawJ by mogwai90 (@mogwai90) on CodePen