//HTML code
<header id="header">
<p>GSAP with Pure JavaScript,<br/><em>Awesome !</em></p>
<ul>
<li><a href="">Link 01</a></li>
<li><a href="">Link 02</a></li>
<li><a href="">Link 03</a></li>
<li><a href="">Link 04</a></li>
<li><a href="">Link 05</a></li>
</ul>
</header>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenMax.min.js"></script>
<script>
var select = function(s) {
return document.querySelector(s);
};
var selectAll = function(s) {
return document.querySelectorAll(s);
};
var itemP = select('p');
var itemLi = selectAll('li');
TweenMax.from(itemP,1,{y:-50,autoAlpha:0});
TweenMax.from(itemLi,1,{y:50,autoAlpha:0});
</script>
No jQuery require. Simple, ligth and faster :)
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.