//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 // Card Constructor function Card(num1,num2) { //properties var suit = num1; var number = num2; //methods ...
-
Find an expression using two values and the modulus operator that results as 4 Answer: 32%7
-
Question: The total power dissipation in an RL series circuit is due to which component? Answer: The total power dissipation is due to ...
-
<style> p { margin: 0px; padding-left: 10%; padding-right: 10%; text-align: justify; border-style: dashed;...
-
Question: How much internal resistance does an ideal current source have? Answer: An ideal current source has infinite resistance.
-
#sample solution threes_and_fives = [x for x in range(16)[1::] if (x%3==0) or (x%5==0)] print threes_and_fives
-
// What's an API key? // A: An alphanumeric string used to identify you to an API // B: An OAuth token // C: An All-Purpose Interne...
-
// Sample solution to style.css html, body { /* The universe takes up all available space */ width: 100%; height: 100%; ...
-
#sample solution def square(n): squared = n**2 print "%d squared is %d." % (n, squared) return squared #Ca...
-
function steamrollArray(arr) { // I'm a steamroller, baby var flattened = arr.reduce( function(a, b) { return a.conca...
No comments:
Post a Comment