Why is my code for getElementsByClassName not working? It works when using getElementById but not with a class? I am using the TweenLite extension.
my code that does not work- http://codepen.io/bleubateau/pen/pvbeaO the same code that works with ID- http://codepen.io/bleubateau/pen/ogLZqb similar code that does work with the class- http://codepen.io/bleubateau/pen/PwzpQj
window.onload = function() {
var play = document.getElementById("lay");
play.onmouseover = function(){
TweenMax.to(play, 0.5, {width:"120px", marginLeft:"-60px", marginTop:"-60px", repeat:-1, repeatDelay:0.1, yoyo:true});
};
play.onmouseout = function(){
TweenLite.to(playBTN, 1, {width:"100px", marginLeft:"-50px", marginTop:"-50px"});
};
}