//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
-
<style> p { margin: 0px; padding-left: 10%; padding-right: 10%; text-align: justify; border-style: dashed;...
-
//sample solution var gender = "female"; if (gender === "female") { result = true; } else { result = false; ...
-
var AppointmentView = Backbone.View.extend({ render: function() { var html = '<li>' + this.model.get('title')...
-
import java.util.ArrayList; public class Temperatures { public static void main(String[] args) { ArrayList<Integer> weeklyTem...
-
//sample solution function factorial(n) { if(n<0){ console.log("Invalid argument. Negative numbers not allowed."); r...
-
class Message @@messages_sent = 0 def initialize(from, to) @from = from @to = to @@messages_sent += 1 end end my_messag...
-
//sample solution function candles(candlesNumber, makeNew) { var newCandles=candlesNumber; var newlyBurnedCandles=0; var lef...
-
Answer: Alt - p p stands for previous. If you keep pressing Alt - p, you will continue cycling back through commands you typed before. I...
-
#sample solution print bin(1) print bin(2) print bin(3) print bin(4) print bin(5)
No comments:
Post a Comment