title: The basic idea of Handlebar.js
body: <p>I am currently learning handlebar.js and I am a very beginner too.I have tried out simple handlebar exercise But I am not getting output as desired can anyone help out what mistake I have in my code.I am sharing my html and javascrpit code and I have downloaded handlebar.js 3.0 version to do this excercise.</p>
  
  <p>html page</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;   
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Handlebars.js Example Template&lt;/title&gt;
          &lt;script type="text/javascript" src="js/handlebars.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
  
          &lt;div id="menu-placeholder"&gt;&lt;/div&gt;
          &lt;h1&gt;Test&lt;/h1&gt;
          &lt;script id="menu-template" type="text/x-handlebars-template"&gt;
  
  
              &lt;ul&gt;
              &lt;li&gt;&lt;a href="{{linkURL1}}"&gt;{{linkName1}}&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="{{linkURL2}}"&gt;{{linkName2}}&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="{{linkURL3}}"&gt;{{linkName3}}&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="{{linkURL4}}"&gt;{{linkName4}}&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="{{linkURL5}}"&gt;{{linkName5}}&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/script&gt;
          &lt;script type="text/javascript" src="js/script.js" /&gt;&lt;/script&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>my javascript file</p>
  
  <pre><code>var menuData = {
      linkName1 : "Link 1",
      linkName2 : "Link 2",
      linkName3 : "Link 3",
      linkName4 : "Link 4",
      linkName5 : "Link 5",
      linkURL1 : "http://google.com",
      linkURL2 : "http://jaskokoyn.com",
      linkURL3 : "http://yahoo.com",
      linkURL4 : "http://youtube.com",
      linkURL5 : "http://twitter.com"
  };
  
  
  // Grab the HTML source that needs to be compiled
  var menuSource = document.getElementById( 'menu-template' ).innerHTML;
  // Compiles the source
  var menuTemplate = Handlebars.compile( menuSource );
  
  
  
  // Process Template with Data
  document.getElementById( 'menu-placeholder' ).innerHTML = menuTemplate( menuData );
  </code></pre>