title: TypeError xxx is not a function
body: <p>All, I am struggling with an error which says <code>TypeError: curTemplete.addSection is not a function</code>, Please forgive that I am not familiar with the js OO, Please help to review my problem. thanks.</p>
  
  <p>The code looks like below.</p>
  
  <p><strong>Templete.js</strong></p>
  
  <pre><code>LayoutTemplete=function(currentTmpContainer,templeteId,data)
  {
      var curTemplete = this;
  
      curTemplete.addSection(null, null);//this line run with error above.
  
  
      this.addSection = function(uiItem, data) {
          alert('ddd');
      };
  };
  </code></pre>
  
  <p>In the <strong>dom ready event</strong>.</p>
  
  <pre><code>function loadTempleteContent(templeteId)
  {
      var jData=[{name: 'jerry'},{name: 'mike'},{name: 'claire'}];
      var tmp = new LayoutTemplete($("#currentTmpContainer"),templeteId,jData);
  }
  </code></pre>