forked from DjjimmyHD/domShizz
/
jQuery.js
45 lines (27 loc) · 1.63 KB
/
jQuery.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// console.log() below to make sure your JQuery is properly connected
// Create 4 variables to select four elements on the page.
// Your variables should select h1, p, and id and a class.
// Log the variables to the console, observe the result.
// PART TWO
// The time of the bears ruling things is over. Lets use DOM manipulation to give power
// to our true overlords CORGIS
// Lets start by changing the text of the H1 to read "CORGIS!"
// Don't forget to select the h1 before trying to change the text
// Do the same thing with the paragraph tag. It should read
// "Two types of corgi lords, Pembroke and Cardigan"
// Cool we are on our way to spreading the good news about our new
// overlords but the site needs more work
// Lets change the image source to be a picture of a corgi of your choosing
// Lets change the class of the lis to be "corgitype"
// Now set the text of each li to be Pembroke and Cardigan
// Change the color of the H1 to be your favorite color
// PART THREE
// Using HTML add a button (maybe give it an id for easy targeting) to the page and style it as you wish
// Add an event listener to the button that prints to the console 'I was clicked'
// Now lets give that button some functionality. I want to start a counter keeps track of how many times the button was clicked
// Instead of printing to the console make the coutner appear somewhere on the webpage
// GREAT WORK
// Lets get rid of the counter but keep the button. When the button is clicked add a picture of a corgi.
// SAND BOX
// There is so much we can do with event listeners and DOM
// Look up differnt jQuery methods and make this page your own