Jump to content
Search Community

getting started issues

tami test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

i am new here and i was following the 'Get Started Quickly With GASP' video. and   there is something i am probably missing because it doesnt work for me.

<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.17.0/TweenMax.min.js"></script>
<script src="js/main.js"></script>

 i added the lines  above  in the body tag as explained:

 and i created a js file in a js folder.

and added the next line:

TweenMax.to(document.getElementById("logo"),2,{left:600});

 and.... nothing happens.

Link to comment
Share on other sites

 i am sorry but i still dont get it....   i think i have everything right but nothing happans.

i added  position : absolute;

also changed my js file. and i dont understand what i am doing wrong.

html:

<body>
<div class="gradient"></div>
<div class="demo">
<img class="logo" style="position:absolute;" src="img/dubi.png"/></div>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.17.0/TweenMax.min.js"></script>
<script src="js/main.js"></script>
</body>

and the javascript:

document.addEventListener('DOMContentLoaded', function() {
TweenMax.to(document.getElementById("logo"),2,{left:600});
});
Link to comment
Share on other sites

my friend you should to select logo by class name not , id :

 

pls try this :

 

change your selector ( select by class name ) :

TweenMax.to(".logo",2,{left:600});

or add logo id to your img tag :

<img id="logo" class="logo" src="img/dubi.png"/>
Link to comment
Share on other sites

i think the problemis diffrent beacause i fixed that and still nothing....

<div class="gradient"></div>
<div class="demo">
<img class="logo"  src="img/dubi.png"/></div>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.17.0/TweenMax.min.js"></script>
<script src="js/main.js"></script>
document.addEventListener('DOMContentLoaded', function() {
TweenMax.toTweenMax.to(".logo",2,{left:600});
});
Link to comment
Share on other sites

 

i think the problemis diffrent beacause i fixed that and still nothing....

document.addEventListener('DOMContentLoaded', function() {
TweenMax.toTweenMax.to(".logo",2,{left:600});
});

 

pls fix this :

TweenMax.to(".logo",2,{left:600});
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...