Task 3: Carousel & Details Module
Do the same for carousel and details js files. Everything is the same, just practicing.
The overview of the module pattern:
var Header = (function(){
function headerLinkclicks(evt) {
..
}
function init() {
..
}
var $modal; // module-wide variable
return {
init: init
};
})();
$(document).ready(Header.init);
Modules should be really your first instinct to organise your code.