BorisMoore / jsrender

A lightweight, powerful and highly extensible templating engine. In the browser or on Node.js, with or without jQuery.
http://www.jsviews.com
MIT License
2.67k stars 339 forks source link

$(...).render is not a function #369

Closed yellareddy-allcloud closed 1 year ago

yellareddy-allcloud commented 2 years ago
@*Add*@ Order Name Sub Section(s)

when am trying to click Add option, adding new row as like as below :

function addTabRow() {

  debugger;

  JqueryAjaxCall('@Url.Action("AddTabRow", "Home")', 'JSON', $("#tblTabs *").serialize(), 'Post', false, function (resp) {

    debugger;

    $("#tblTabs").html(
      $("#tabsTemplate").render(resp.RenderMasterUI)
    );

  });
}

throwing .render is not a function

BorisMoore commented 1 year ago

If you load jquery.js and then jsrender.js (or jsviews.js), then $(...).render will be a function.

Are you doing something in JqueryAjaxCall (or in the callback ) which is somehow unloading jsrender.js, or reloading the whole page without jsrender.js?

At any rate this does not correspond to a known bug in jsrender.js, so resolving as N/A for now.

If you still have a problem, can you post a complete sample (on jsfiddle for example) showing the issue?

Thanks.