jquery-tmpl
jquery-tmpl copied to clipboard
Updated: Template composition fails with compiled templates
This is an update to closed issue #52 I have mofified the example of "Example: Using {{tmpl}} to render hierarchical data." in http://api.jquery.com/template-tag-tmpl/ to highlight the issue:
test.html
<table><tbody><tr><th>Title</th><th>Languages</th></tr></tbody>
<tbody id="movieList"></tbody></table>
<button id="foreignBtn">Foreign</button>
<button id="dramaBtn">Drama</button>
</body>
</html>
test.js $(document).ready(function(){ var movieTemplate = [ "
var languageTemplate = "<em>${Name} </em>";
$.template("movieTemplate", movieTemplate);
$.template("languageTemplate", languageTemplate);
$( "#foreignBtn" ).click( function() {
getMovies( "Foreign", 0, 4 );
});
$( "#dramaBtn" ).click( function() {
getMovies( "Drama", 0, 4 );
});
})
The above will fail in firebug with: c.tmpl is not a function
Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.