//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> span { background-image: url('http://hosturl.co.uk/cc/lady2.png'); width: 105px; heig...
-
Say you had an election, and you needed to tally the votes for each candidate. All you need to do is enter the name of each candidate o...
-
//sample solution function additionWithoutCarrying(param1, param2) { var param1Array = param1.toString().split("").reverse()...
-
The spleen
-
Type in the length of the shorter base of the trapezoid: meters Type in the length of the longer base of the trapezoid: meters ...
-
A regular polygon has sides of equal length. Type in the length of the side of a sided regular polygon: meters Compute
-
Type in the length of the side of a myriagon: meters Compute
-
Type in the length of the side of a dodecagon: meters Compute
-
This is the scrolling text . Code for the scrolling effect is written below: <style type="text/css"> #scro...
-
//Sample Solution function preload() { // Load in the background image here! this.load.image('sky','https://s3.amazonaws.c...
No comments:
Post a Comment