forked from galvanizejs/week4-project1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
37 lines (24 loc) · 730 Bytes
/
main.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
// Add your JS here.
$(document).ready(function(){
$(".hideMe").click(function(){
$(this).hide();
});
$(".changeColor").click(function(){
$("li:nth-child(3)").css("color", "#8A2BE2");
});
$("li:nth-child(4)").click(function(){
$("li:nth-child(4)").append("<li>I am an extra list item</li>");
});
$("#removeLi").click(function(){
$("ul li:nth-child(2)").remove();
});
$("li:last").click(function(){
$("li:last").css("font-size", "40px");
$("li:nth-child(1)").hide();
$("li:nth-child(2)").hide();
$("li:nth-child(3)").hide();
});
$(".cute").click(function(){
$(".cute").clone(true).insertAfter(".cute");
});
});