Next, let's get the content into separate files for the sections. We're going to really break the application now. At least we'll have something to fix again to move forward with our Single Page Application.
We already have a home
directory. Next, add directories for the remaining sections: news
, tasks
, weather
, travel
, and stocks
, with the name being the same as the section. Inside each of these directories, add an HTML file named the same as the directory prepended by home
and a dash, like this: home-news.html
and home-stocks.html
. Now, we need to break out the content from the DIV
elements and into the directories. First, in home
-home.html
file, only write the text, time, with no markup. As you may recall, the time JavaScript will replace this anyway with the clock. Next, in the home.html
file, find the DIV
element with the class news
. Add an ID
attribute, news
, to that DIV
element.
Then cut its child UL list element from...