Now that the home content script is still running, move on to some utility functions. We next want to begin creating scripts that provide utility functions.
These will all be contained in a services
object, so at the end of the script, create a new object variable called services
.
var services = {};
The first thing the services layer will handle will be an AJAX call. We want to be able to use this to get the content asynchronously and placed into a DIV
element. So, to demonstrate this, let's break the app into some separate concerns.