Created
October 10, 2016 14:32
-
-
Save courtney-scripted/7cd262364dadc7bc9f9594b9a4dbdfab to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=7cd262364dadc7bc9f9594b9a4dbdfab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jQuery Practice 1</title> | |
</head> | |
<body> | |
<h1>The jQuery Site</h1> | |
<div id="info"></div> | |
<div id="cool"> jQuery is cool I guess</div> | |
<img id="pic" src="www.fake.com"> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Task 1: Use jQuery to make the text "The jQuery Site" be green. | |
$("h1").css("color", "green"); | |
//Task 2: Use jQuery to append the text "This site was made almost entirely using jQuery!" to the id info. | |
$("#info").append("This site was made almost entirely using jQuery!"); | |
//Task 3: Use jQuery to change the text in the div cool to say "jQuery is AWESOME!" | |
//hint: this needs to be done using the action .html | |
$("#cool").html("jQuery is AWESOME!"); | |
//Task 4: Use jQuery to change the source attribute in the ID pic to this link --> "https://cdn.meme.am/instances/57092433.jpg" | |
//hint: you will need to use a selector found on page 6 of the reference table | |
$("#pic").attr("src", "https://cdn.meme.am/instances/57092433.jpg"); | |
//Bonus: Use jQuery to make it so that when you click on the h1 tag the text changes to your name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment