What is $(document).ready(function() {}); ?
Is a way to start up jQuery. Is telling the system to do something when the document is ready.
How do I select the div.box object in jQuery?
$('.box')
<body>
<main>
<div class="container">
<div class="row">
<div class="box">
<h1>Hello World</h1>
</div>
<a href="#" class="button">Click me</a>
</div>
</div>
</main>
</body>
How would I hide the above box in jQuery?
How do I create a variable in jQuery?
var name = number; var name = "text"; var name = $('p');
Write a simple function to change the font colour of the h1 element when I click the button in the above example.
Write another example to show and hide the box after 1 second when you click the button
setTimeout(function (){
$('.box').hide ();
},1000);
});
Run your examples Make sure they work