Task 3: app.js
We need to refactor so that there's only one
document.ready
event.He creates a new file, app.js and adds
document.ready
and initialises the there modules:
// app.js
$(document).ready(function(){
Header.init();
Carousel.init();
Details.init();
});
Then you can take the document ready init from these modules. He adds app.js as the last
<script>
import in the html file.