Jump to content
Search Community

Dejan

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Dejan

  1. Thanks i did that i wrapped a code in if statement if(location.href === "https://www.identitet021.rs/home/")
  2. Thanks for help i didn't separate code because there was no problem with old version. And with that new version if its not separated doesn't work. Now works fine.
  3. Yes i know like i said that animation is for homepage and it works fine no errors no warnings but problem is on second page of site for every line before that is a warning in console that gsap cant find target because its on homepage i know that, but it breaks on animation that have attr obj in it when i remove those animation there is no error in console only warnings. So problem is when i have i attr in animation for another page and code is before active pages code, code breaks and animation is never loaded.
  4. I tried with that version to but same error, in codepen works https://codepen.io/DejanId021/pen/zYYVXGQ so i then i updated everything and cleaned all errors homepage, but same error with gsap when site goes on second page. Animation works fine on homepage without errors but when i click and go to other page i get warnings from animation on homepage that gsap cant find target element and when tries to fire this animation: .from(".linija-about line", {duration: 2, attr: {x1:0, x2:0}, scale:0.2, transformOrigin:"center", autoAlpha:0}, "dva") gsap breaks and error Uncaught TypeError: t.getAttribute is not a function at n.init (gsap-core.js:2852) at Bb (gsap-core.js:2048) at _initTween (gsap-core.js:2143) at va (gsap-core.js:299) at _renderZeroDurationTween (gsap-core.js:332) at Tween.render (gsap-core.js:2316) at new Tween (gsap-core.js:2305) at Function.set (gsap-core.js:2506) at _initTween (gsap-core.js:2104) at va (gsap-core.js:299) init @ gsap-core.js:2852 Bb @ gsap-core.js:2048 _initTween @ gsap-core.js:2143 va @ gsap-core.js:299 _renderZeroDurationTween @ gsap-core.js:332 render @ gsap-core.js:2316 Tween @ gsap-core.js:2305 set @ gsap-core.js:2506 _initTween @ gsap-core.js:2104 va @ gsap-core.js:299 render @ gsap-core.js:2354 Tween @ gsap-core.js:2305 from @ gsap-core.js:1431 (anonymous) @ identitet.js:19 i @ jquery.js?ver=1.12.4-wp:2 fireWith @ jquery.js?ver=1.12.4-wp:2 ready @ jquery.js?ver=1.12.4-wp:2 J @ jquery.js?ver=1.12.4-wp:2
  5. I have read "GSAP 3 Release Notes" minimum 15 times and searched the forums for answers but nothing, my main problem is this error Uncaught TypeError: t.getAttribute is not a function at n.init (gsap-core.js:2852) at Bb (gsap-core.js:2048) at _initTween (gsap-core.js:2143) at va (gsap-core.js:299) at _renderZeroDurationTween (gsap-core.js:332) at Tween.render (gsap-core.js:2316) at new Tween (gsap-core.js:2305) at Function.set (gsap-core.js:2506) at _initTween (gsap-core.js:2104) at va (gsap-core.js:299) init @ gsap-core.js:2852 Bb @ gsap-core.js:2048 _initTween @ gsap-core.js:2143 va @ gsap-core.js:299 _renderZeroDurationTween @ gsap-core.js:332 render @ gsap-core.js:2316 Tween @ gsap-core.js:2305 set @ gsap-core.js:2506 _initTween @ gsap-core.js:2104 va @ gsap-core.js:299 render @ gsap-core.js:2354 Tween @ gsap-core.js:2305 from @ gsap-core.js:1431 (anonymous) @ identitet.js:19 gsap.registerPlugin(TextPlugin, CSSRulePlugin, EasePack, AttrPlugin, CSSPlugin); var tl = gsap.timeline({smoothChildTiming: true, paused:true}); tl.from(".logo-lice", {duration: 2, scale:0, transformOrigin: "center", autoAlpha:0}, "prvi") .from(".prvi-krug-logo", 2, {duration: 2, strokeDashoffset: 1610, rotation:-360,scale:0.5, transformOrigin: "center", autoAlpha:0}, "prvi" ) .from(".zubcanik-logo", {duration: 1.5, rotation:360 , scale:0.8, transformOrigin:"center", autoAlpha:0}, "<" ) .to(".zubcanik-logo", {duration: 4, rotation:360, repeat:-1, yoyo:true, transformOrigin:"center", ease: Sine.easeInOut}, "<") .from(".drugo-krug-logo", {duration: 1, scale:0.8, transformOrigin:"center", autoAlpha:0}, "<") code line 19 .from(".linija-about line", {duration: 2, attr: {x1:0, x2:0}, scale:0.2, transformOrigin:"center", autoAlpha:0}, "dva") .from(".linija-marketing line", {duration: 2, attr: {x1:0, x2:0},scale:0.2, transformOrigin:"center", autoAlpha:0}, "dva") .from(".linija-design line", {duration: 2, attr: {x1:2000, x2:2000}, scale:0.2, transformOrigin:"center", autoAlpha:0}, "dva") .from(".linija-development line", {duration: 2, attr: {x1:2000, x2:2000}, scale:0.2, transformOrigin:"center", autoAlpha:0}, "dva") .from(ostaliDeloviLinije, {duration: 1, strokeDashoffset: 35}, "<") .from(".linije-izvan-logoa line", {duration: 1, strokeDashoffset: 130}, "2.5" ) and other 22 warnings are like this GSAP target .logo-lice not found. https://greensock.com L @ gsap-core.js:52 Tween @ gsap-core.js:2239 from @ gsap-core.js:1431 (anonymous) @ identitet.js:14 Invalid scale tween of 0 Missing plugin? gsap.registerPlugin() i have loaded <script src="https://cdn.jsdelivr.net/npm/gsap@3.0.1/dist/gsap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.0.1/CSSRulePlugin.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.0.1/EasePack.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.0.1/TextPlugin.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script> If this doesn't help i will make pen tomorow. Thanks
  6. Hi, I have i little problem with switching to gsap v3 I have a lot errors in console log of GSAP target not found and error when trying to change attr of element. I created animation last week in old GSAP and everything worked fine. Links to site https://www.identitet021.rs/home/ and https://www.identitet021.rs/development/ site is not live yet. Animation works on home page but it doesnt work as it should, minor problems. Animation on Development page and other functions doesnt work. Little help in transition to GSAP v3 is needed. Great job on GSAP v3. Thanks, Dejan
×
×
  • Create New...