//sample solution to ui.js // Fill out this function! function drawHead() { $('.draw-area').append(""); $('.head').addClass('body-part'); } // Fill out this function too! function drawTorso() { $('.draw-area').append(""); $('.armbox').addClass('body-part'); $('.armbox').append(""); $('.torso').addClass('body-part'); $('.draw-area').append(""); $('.legbox').addClass('body-part'); $('.legbox').append(""); $('.pelvis').addClass('body-part'); } // You shouldn't need to touch these. These are just here to // show you the output! drawHead(); drawTorso();
Quotes help make search much faster. Example: "Practice Makes Perfect"
Friday, November 16, 2012
Codecademy: "Drawing the Head and Torso Dynamically!"
//sample solution to ui.js // Fill out this function! function drawHead() { $('.draw-area').append(""); $('.head').addClass('body-part'); } // Fill out this function too! function drawTorso() { $('.draw-area').append(""); $('.armbox').addClass('body-part'); $('.armbox').append(""); $('.torso').addClass('body-part'); $('.draw-area').append(""); $('.legbox').addClass('body-part'); $('.legbox').append(""); $('.pelvis').addClass('body-part'); } // You shouldn't need to touch these. These are just here to // show you the output! drawHead(); drawTorso();
Labels:
Codecademy,
jQuery
Subscribe to:
Post Comments (Atom)
This is an example of scrolling text using Javascript.
Popular Posts
-
<!-- Sample solution to index.html --> <!DOCTYPE html> <html> <body> <div class="nav"> ...
-
favorite_animal ||= "dog" favorite_animal ||= "cat"
-
//sample solution def isEven(x): if(x % 2 == 0): return "yep" else: return "nope"
-
//sample solution var yourName = "Pam"; var gender = "female"; var result; //Line 10 starts an if statement //Ne...
-
<!--sample solution--> <html> <head> <title>Week 13 Project</title> </head> ...
-
<html> <head> <!-- Add the Parse SDK here! --> <script src="http://www.parsecdn.com/js/par...
-
#sample solution hungry = false unless hungry puts "I'm writing Ruby programs!" else puts "Time to eat!...
-
//create an array var myArray = [1,2,3]; //find the length of it using .length var arrayLength = myArray.length; //get the first elem...
-
Answer: Alt - p p stands for previous. If you keep pressing Alt - p, you will continue cycling back through commands you typed before. I...
-
$("#vacations li").last()
No comments:
Post a Comment