title: .render is not a function, working with templates in jquery
body: <p>I have mine templates in masterPage and then I have one webpart with userControl.ascx and I pretend to inform diferent fields of templates throught this userControl.</p>
  
  <p>This is mine templates in masterPage.master:</p>
  
  <p> </p>
  
  <pre><code>&lt;script id="GroupDiscussionsTemplate" type="text/x-jquery-tmpl"&gt;
  
          &lt;div id="discussion-with-comments-wrapper_{{=_DiscussionId}}"&gt;
  
              &lt;div class="subsection theme-header"&gt;
                  &lt;div class="wrapper"&gt;
                      &lt;div class="gray-arrow"&gt;&lt;/div&gt;
                      &lt;div class="avatar clearfix"&gt;
                          &lt;div class="thumbnail-wrapper"&gt;
                              &lt;a href="{{=AdminProfileUrl}}"&gt;&lt;img class="thumbnail" src="{{=AdminImage}}"/&gt;&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="theme-content"&gt;
                          &lt;p class="title"&gt;&lt;a href="{{=url}}"&gt;{{=Name}}&lt;/a&gt;
                              {{#if _Active !== true}}
                                  &lt;asp:Literal runat="server" Text="&lt;%$Resources:ADNResource,NoActiveGroup%&gt;"/&gt; 
                              {{/if}}
                          &lt;/p&gt;
                          &lt;p&gt;{{=CreatedDate}}&lt;/p&gt;
  
                          &lt;p&gt;&lt;a class="name" href="{{=AdminProfileUrl}}"&gt;{{=AdminName}}&lt;/a&gt; | {{=AdminLocation}} | Rnk: {{=AdminPoints}}&lt;/p&gt;
  
                          &lt;p&gt;
                              {{=Description}}
                          &lt;/p&gt;
                          &lt;div class="recommend"&gt;                                                                       
                              &lt;iframe src="//www.facebook.com/plugins/like.php?href={{=UniqueUrl}}&amp;amp;send=false&amp;amp;layout=button_count&amp;amp;width=450&amp;amp;show_faces=false&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;font&amp;amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"&gt;&lt;/iframe&gt;
                          &lt;/div&gt;
                          &lt;div id=inapropiatedCmnt_{{=_DiscussionId}} class="commentinapropiate discussionInapropiate"&gt;
                              &lt;div class="icon-sprite icon-alert"&gt;&lt;/div&gt;
                              &lt;asp:Literal runat="server" Text=" &lt;%$Resources:ADNResource,InapropiatedComment%&gt;"/&gt; 
                          &lt;/div&gt; 
                          {{#if _IsCurrentUserOwner}}
                              {{#if _Active eq='true'}}
                                  &lt;div id="deleteDiscussion_{{=_DiscussionId}}" class="delete-link button-secondary-L-S"&gt;&lt;asp:Literal runat="server" Text=" &lt;%$Resources:ADNResource,Delete%&gt;"/&gt; &lt;/div&gt;
                              {{/if}}
                          {{/if}}  
  
                     &lt;/div&gt;                 
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div id="AddCommentBox" class="AddCommentBox subsection theme" style="display:none;"&gt;
                  &lt;div class="wrapper"&gt;
                      &lt;textarea class="txtComment" id="txtComment_{{=_DiscussionId}}" rows="3" cols="65" /&gt;
                      &lt;div class="button-L-S btnComment" id="btnComment_{{=_DiscussionId}}"&gt;
                          &lt;asp:Literal runat="server" Text="&lt;%$Resources:ADNResource,Comment%&gt;"/&gt; 
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class="commentsWrapper" id="Comments_{{=_DiscussionId}}"&gt;            
                  {{#if Activities}}                                                               
                      {{#each Activities}}  
                          &lt;div class="comment subsection theme"&gt;                                 
                              &lt;div class="wrapper"&gt;
                                  {{#if titleHeader}}
                                      &lt;p class="title"&gt;{{=titleHeader}}&lt;/p&gt;
                                  {{/if}}
  
                                  &lt;div class="avatar clearfix"&gt;
                                      &lt;div class="thumbnail-wrapper"&gt;
                                          &lt;img class="thumbnail" src="{{=UserImage}}" /&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
  
                                  &lt;div class="theme-content"&gt;
                                      &lt;a class="name" href="{{=UserProfileUrl}}"&gt;{{=UserName}}&lt;/a&gt;
  
                                      &lt;p&gt;{{=Comment}}&lt;/p&gt;
  
                                      &lt;div class="recommend"&gt; 
                                          &lt;iframe src="//www.facebook.com/plugins/like.php?href={{=UniqueUrl}}&amp;amp;send=false&amp;amp;layout=button_count&amp;amp;width=450&amp;amp;show_faces=false&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;font&amp;amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"&gt;&lt;/iframe&gt;
                                      &lt;/div&gt;
  
  
                                      &lt;div id=inapropiatedCmnt_{{=_Id}} class="commentinapropiate"&gt;
                                          &lt;div class="icon-sprite icon-alert"&gt;&lt;/div&gt;
                                          &lt;asp:Literal runat="server" Text=" &lt;%$Resources:ADNResource,InapropiatedComment%&gt;"/&gt; 
                                      &lt;/div&gt;
  
                                      {{#if _IsCurrentUserOwner}}
                                          &lt;div id="deleteComment_{{=_Id}}" class="delete-link button-secondary-L-S"&gt;&lt;asp:Literal runat="server" Text=" &lt;%$Resources:ADNResource,Delete%&gt;"/&gt; &lt;/div&gt;
                                      {{/if}}
  
                                  &lt;/div&gt;    
                              &lt;/div&gt;                 
                          &lt;/div&gt;
                      {{/each}}
                  {{else}}
                              &lt;div class="comment subsection theme"&gt;
                                  &lt;div class="wrapper"&gt;
                                      &lt;asp:Literal runat="server" Text=" &lt;%$Resources:ADNResource,NoCommentsYet%&gt;"/&gt; 
                                  &lt;/div&gt;
                              &lt;/div&gt;
                  {{/if}}
              &lt;/div&gt;
  
          &lt;/div&gt;
  
  
  &lt;/script&gt;
  
  &lt;script id="GroupDiscussionsComentsTemplate" type="text/x-jquery-tmpl"&gt;            
      &lt;div class="comment subsection theme" id="comment_{{=_Id}}" style="display:none;"&gt;                                 
          &lt;div class="wrapper"&gt;
              {{#if titleHeader}}
                  &lt;p class="title"&gt;{{=titleHeader}}&lt;/p&gt;
              {{/if}}
  
              &lt;div class="avatar clearfix"&gt;
                  &lt;div class="thumbnail-wrapper"&gt;
                      &lt;img class="thumbnail" src="{{=UserImage}}" /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class="theme-content"&gt;
                  &lt;a class="name" href="{{=UserProfileUrl}}"&gt;{{=UserName}}&lt;/a&gt;
  
                  &lt;p&gt;{{=Comment}}&lt;/p&gt;
  
                  &lt;div class="recommend"&gt;   
                      &lt;iframe src="//www.facebook.com/plugins/like.php?href={{=UniqueUrl}}&amp;amp;send=false&amp;amp;layout=button_count&amp;amp;width=450&amp;amp;show_faces=false&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;font&amp;amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"&gt;&lt;/iframe&gt;
                  &lt;/div&gt;
  
                  &lt;div id=inapropiatedCmnt_{{=_Id}} class="commentinapropiate"&gt;
                      &lt;div class="icon-sprite icon-alert"&gt;&lt;/div&gt;
                      &lt;asp:Literal runat="server" Text=" &lt;%$Resources:ADNResource,InapropiatedComment%&gt;"/&gt; 
                  &lt;/div&gt;
  
                  {{#if _IsCurrentUserOwner}}
                      &lt;div id="deleteComment_{{=_Id}}" class="delete-link button-secondary-L-S"&gt;&lt;asp:Literal runat="server" Text=" &lt;%$Resources:ADNResource,Delete%&gt;"/&gt; &lt;/div&gt;
                  {{/if}}
  
              &lt;/div&gt;    
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/script&gt;
  
  &lt;script id="GroupDiscussionsTemplateNoResults" type="text/x-jquery-tmpl"&gt;
      &lt;div class="subsection"&gt;
          &lt;div class="wrapper"&gt;
              &lt;asp:Literal runat="server" Text="&lt;%$Resources:ADNResource,NoDiscussionsForThisGroup%&gt;"/&gt;
          &lt;/div&gt;
      &lt;/div&gt;        
  &lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <p>And I use function .render to inform some fields of this templates with this code:</p>
  
  <pre><code>function displayGroupDiscussions(param_group, maxDiscussions) {
          iDiscussions = 0;
  
          showLoading();
          $.getJSON("/_layouts/getDiscussions.ashx",
              {
                  groupId: param_group,
                  startIndexDiscussions: iDiscussions,
                  numberOfDiscussions: maxDiscussions
              },
                  function (data) {
                      if(data.CallOk) {
                          if (data.Data != null) {
                              if (data.Data.length &gt; 0) {
                                  $('#groupDiscussionsBox').html(
                                      $('#GroupDiscussionsTemplate').render(data.Data)
                                  );
                              } else {
                                  $('#groupDiscussionsBox').html(
                                      $("#GroupDiscussionsTemplateNoResults").render()
                                  );
                                  $('div#more').remove();
                              }
                          } else {
                              $('#groupDiscussionsBox').html(
                                  $("#GroupDiscussionsTemplateNoResults").render()
                              );
                              $('div#more').remove();
                          }
                      } else { 
                          $('#groupDiscussionsBox').html(data.Message);
                      }
                  }
              ).complete(
                  function () {
                      hideLoading();
  
                      if(&lt;%= ParentWebPart.CanAddComments.ToString().ToLower() %&gt;){
                          $('.AddCommentBox').show();
  
                          $('.btnComment').click( function() { 
                              var discId = this.id.split("_")[1];
                              var commentText = $('textarea#txtComment_' + discId).val();
                              addCommentToDiscussion(discId, commentText);
                          });
                      }
  
                      $('.discussionInapropiate').click( function() { 
                          var discId = this.id.split("_")[1];
                          reportInapropiate(discId, "Discussion");
                          $('#' + this.id).hide('slow');
                      });
                      $('.commentinapropiate').click( function() { 
                          var discId = this.id.split("_")[1];
                          reportInapropiate(discId, "DiscussionComment");
                          $('#' + this.id).hide('slow');
                      });
  
                      $('.delete-link').click( function() {                         
                          deleteDiscussionItem(this.id);
                      });
                  }
              );
      }
  </code></pre>
  
  <p>It reports the following error in Mozilla:</p>
  
  <pre><code>$("#GroupDiscussionsTemplate").render is not a function
  http://testpcir.powerslide.cir/Pages/foro.aspx
  Line 758
  </code></pre>
  
  <p>inside this error I found this ---> <code>clone(a=readystatechange , e=undefined)</code></p>
  
  <p>Someone can help me?,</p>
  
  <p>Thanks</p>