6 Replies Latest reply on Oct 20, 2016 9:06 PM by varreysing

    My first attempt to program not working

    varreysing

      My HTML file

       

      <!doctype html>
      <html>
      <head>
      <title>Silly Simple</title>

      </head>
      <body>
      <button id="silly">Do It</button>
      <button id="clear">Clear</button>
      <div id="results"></div>
      <script src="js/zepto.js"> <\script>
      <script src="js/silly.js"></script>
      <script>$('#silly').click(function(){
      SILLY.DoIT($('#results'));
      });
      $('#clear').click(function(){
      $('#results').html('');
      });
      </script>
      </body>
      </html>

       

      My JS file

       

      var SILLY = (function(module){

      module.DoIT = function(resultObject){

      resultObject.prepend(Date() + '<br/>')};

      return module;

      }(SILLY || {}));

       

      I have downloaded zepto.js to work with this program....There are two buttons "Do It" and "Clear"

      Pressing "Do It" is supposed to display Date and "Clear" supposed to clear the screen....

      But "Do It" is not working....

       

      Please help !!!!!