•  
     

Nome animado - JavaScript

index.html

Código: Selecionar todos

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/alphabet.js"></script>
  </head>
  <body>
    <canvas id="myCanvas"></canvas>
    <script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/bubbles.js"></script>
    <script type="text/javascript" src="main.js"></script>
  </body>
</html>


main.js

Código: Selecionar todos

var red = [0, 100, 63];
var orange = [40, 100, 60];
var green = [75, 100, 40];
var blue = [196, 77, 55];
var purple = [280, 50, 60];

var myName = "Acemprol";
var letterColors = [red, orange, green, blue, purple];

if(10 < 3) {
    bubbleShape = 'square';
}
else {
    bubbleShape = 'circle';
}

drawName(myName, letterColors);
bounceBubbles();


Demo: http://jsfiddle.net/VcCc8/

Passe o mouse no nome Acemprol
 
jQuery é lindo :D