Hi,
I'm a newbie to using GreenSock. My level of JS and CSS knowledge is rather limited.
I've purchased the PRO license as well.
Using Codepen to try out the effects is great, but I'm at a loss when trying to figure out just how it all needs to be included in a HTML file.
Just copy pasting the code from codepen doesn't seem to help in anyway.
Are there tutorials with html (+css ) exercise files that I can take a look at and play with so I can understand how this works and use it?
Here's an example of what I've tried so far, with little luck.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Html 5</title>
ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css
<style>
body {
margin:10px;
}
.box {
display:block;
width:200px;
height:200px;
}
.green {
background:green;
width:200px;
height:200px;
}
</style>
</head>
<body>
<h2 class="title">TweenMax.to() Basic Usage</h2>
<div class="box orange"></div>
<div class="box grey"></div>
<div class="box green"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.2/TweenMax.min.js"></script>
<script type="text/javascript">
function animateIt(){
TweenMax.to("h2.title", 1, {opacity:0.3});
TweenMax.to(".box", 3, {x:300});
TweenMax.to(".green", 3, {rotation:360, scale:0.5});
//use the defaults
TweenLite.to(element, 1, {scrambleText:"THIS IS NEW TEXT"});
//or customize things:
TweenLite.to(element, 1, {scrambleText:{text:"THIS IS NEW TEXT", chars:"XO", revealDelay:0.5, speed:0.3, newClass:"myClass"}});
Get an all-access pass to premium plugins, offers, and more!
JOIN THE CLUB
}
animateIt();
</script>
</body>
</html>