Skip to content

Commit

Permalink
3 - Selectors Part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
codingforentrepreneurs committed Oct 3, 2017
1 parent 5640cc8 commit 4cd3edb
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions fasttracktojquery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,22 @@
/*body {
background-color: red;
}*/
h1 {
color: green;
}

#header-3 {

}
</style>

</head>
<body>
<h1>Hello, world!</h1>

<h1 class='header'>Hello, world!</h1>
<h1 class='header'>Hello, world!</h1>
<h1 class='header' id='header-3'>Hello, world!</h1>
<h1 class='header'>Hello, world!</h1>
<p>Paragraph Paragraph Paragraph </p>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src='https://code.jquery.com/jquery-3.2.1.min.js'></script>
Expand All @@ -28,8 +38,12 @@ <h1>Hello, world!</h1>
// $('body').css("background-color", "red")

setTimeout(function(){
$('body').css("background-color", "red")
}, 5000) // in ms
// $('body').css("background-color", "red")
$('h1').css("color", "purple")
$('h1:nth-child(2)').text("Hello again!")
$('#header-3').text("Hello again header 3!")
$(".header").css("background-color", "green").css("padding", "30px")
}, 2000) // in ms
})
</script>

Expand Down

0 comments on commit 4cd3edb

Please sign in to comment.