Static template via a SCRIPT tag, using Jquery Templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Works even without the "plus" extension of the Templates plugin. | |
http://github.com/nje/jquery-tmpl | |
--> | |
<script id="MyStaticTemplate" type="text/x-jquery-tmpl"> | |
<div>Hello ${hello}</div> | |
</script> | |
<script> | |
var MyData = {hello: "world"}; | |
$("#MyStaticTemplate").tmpl(MyData).appendTo("#contents"); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment