//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 solutions to Welcome to HTML! --> <h1>Bruce Wayne</h1> <!-- sample solutions to Speak in Paragraphs --> ...
-
class Dog{ int age; public Dog(int dogsAge){ age = dogsAge; } public void bark() { System.out.println("Woof...
-
#sample solution def factorial(x): x = abs(x) #prevents error on negative numbers product = 1 for i in range(x): product = prod...
-
// Sample Solution using System; namespace DocumentationHunt { class Program { static void Main(string[] args) { ...
-
#sample solution def run(bottle): #your code here bottle.drink(250) bottle.refill(150) return bottle.amount_left cl...
-
//sample solution // Here is the array we will store results in var multiples = []; function multiplesOf(base, i) { // Base case ...
-
<style> p { font-family: sans-serif; font-size:18px;} div#welcome p{ font-family: cursive; font-size: 24px; color: white; b...
-
//Sample solution to script.js $('document').ready(function() { $('#emptyTrash').click(function() { //remove the elemen...
-
//sample solution function isCaseInsensitivePalindrome(inputString) { var temp = inputString.toLowerCase(); var tempReversed = te...
-
// Sample Solution using System; namespace ComparisonOperators { class Program { static void Main(string[] args) { ...
No comments:
Post a Comment