title: Input type = button fails to execute javascript function
body: <p>Used this question here for reference: <a href="https://stackoverflow.com/questions/1947263/using-an-html-button-to-call-a-javascript-function">Using an HTML button to call a JavaScript function</a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>jQuery ( document ).ready( function ( $ ) {
  
      function demoBanner () { 
  
          // set click handler
          $( '#demo' ).click( function ( ) {
  
          alert('click registered...');
          });      
      }
      // called functions
      $ ( function () {
  
          demoBanner();
  
      });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input id="demo" type="button" class="btn btn-warning" value="Demo Banner"&gt;
  
  &lt;!--jquery CDN --&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  
  
  &lt;!-- local JS --&gt;
  &lt;script src="http://localhost:8888/js/test.js"&gt; &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Why isnt the function being called?</p>