//Sample Solution for script.js $('document').ready(function() { $('#changeButton').click(function() { //create a new div with id 'new-div' $newDiv = $(''); //code to insert the element into the page. //you'll learn this next section! //(and a little at the end of this one) $newDiv.html("I'm the new div"); $('body').append($newDiv); }); });
Quotes help make search much faster. Example: "Practice Makes Perfect"
Thursday, November 8, 2012
Codecademy: Sample Solution to "In the beginning..." under the jQuery track
//Sample Solution for script.js $('document').ready(function() { $('#changeButton').click(function() { //create a new div with id 'new-div' $newDiv = $(''); //code to insert the element into the page. //you'll learn this next section! //(and a little at the end of this one) $newDiv.html("I'm the new div"); $('body').append($newDiv); }); });
Labels:
Codecademy,
jQuery
Subscribe to:
Post Comments (Atom)
This is an example of scrolling text using Javascript.
Popular Posts
-
//Sample Solution const gameState = {} function preload() { this.load.image('codey', 'https://s3.amazonaws.com/codecademy-...
-
function checkAnswerWrongPlace(ans, realanswer){ // This method compares two input strings representing a player's guess ("an...
-
#sample solution def colorful_conditions(): color = "blue" if color == "red": return "firs...
-
//sample solution //Here is the original card object var card1 = {"suit":"clubs", "rank": 8}; //Create a ...
-
//sample solution //Here is the original card object var card1 = {"suit":"clubs", "rank": 8}; //Create a...
-
# note: The instructions state to use "text.txt" but an error comes up stating that the file does not exist # as a work around, ...
-
Instruction: Find the id of the flights whose distance is below average for their carrier. Sample Solution: SELECT id FROM flights AS f...
-
# Sample Solution # Import packages import numpy as np import pandas as pd # Read in transactions data transactions = pd.read_csv(...
-
/*sample solution for style.css*/ body > p { background: green; } p { background: yellow; }
-
# Sample Solution from song_data import songs import numpy as np q1 = np.quantile(songs, 0.25) #Create the variables q3 and interquarti...
No comments:
Post a Comment