var Pen = { }; Pen.init = function(){ CSSPlugin.defaultTransformPerspective = 500; var headingHtml = $("#heading").html(); var output = ""; _.each(headingHtml.split(""), function(item){ output += "" + item + ""; }); console.log(output); $("#heading").html(output); Pen.doTween(); }; Pen.doTween = function(){ _.each($(".char"), function(item){ var tmp = Math.random(); TweenMax.from(item, (tmp*1)+1.5, { "delay": 0.5, "opacity": 0.0, "z": 100 + (600*tmp) }); }); _.delay(Pen.doTween, 3000); }; $(document).ready(function(){ Pen.init(); });