-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExercise15.html
46 lines (42 loc) · 1.37 KB
/
Exercise15.html
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
46
<html><head></head><body>
<div id="everything">
<h1>A heading!</h1>
<p>Here's some text!</p>
<p>Here's a second set of text!</p>
<div class="holder">
<ul>
<li>List Item 1</li>
<li>List Item 2</li>
<li>List Item 3</li>
</ul>
</div>
<div class="holder">
<ul>
<li id="changeMe">List Item 4</li>
<li>List Item 5</li>
<li>List Item 6</li>
</ul>
</div>
<div id="secret">We should hide this!</div>
</div>
<script src='http://code.jquery.com/jquery-2.1.1.js'></script>
<script>
$('h1').css('color', 'blue')
$('body').css('background-color', 'red')
$('#everything').css('font-size', '150%')
$('.holder').css('border-style', 'solid')
$('.holder').css('border-width', '10px')
$('holder').css('border-color', '#000')
$('li, ul').css('font-weight', 'bold')
$('h1').next('p').css('color', 'green')
$('#secret').css('display', 'none')
$('#changeMe').text('new sentence')
$('#changeMe').append(' new text')
$('li').text("Meet the new sentence.")
$('li').append(" Same as the old sentence.")
$('#secret').css('display', 'block')
$('#secret').html('<h2>My secrets on the front page every week. </h2>')
$('#everything').append('<h3>*apologies for the abrasive colors</h3>')
</script>
</body>
</html>