Build a Search App: First Steps Towards Interactivity

structure.html

<html>
  <head>
    <title>Instant Search</title>
    <link rel="stylesheet" type="text/css" href="presentation.css" />
  </head>
  <body>
     <h1>Hello, World!</h1>
    <script type="text/javascript" src="behavior.js"></script>
  </body>
</html>

presentation.css

body { background-color:yellow; }

behavior.js

var SEARCH = function() {
  var $ = {};
  return {
    init : function() {
       SEARCH.doStuff();
    },
    doStuff : function() {
       alert('ding!');
    }
  };
}();

window.onload = function() {
  SEARCH.init();
};

Up next: Input / Output