Skip to content

Instantly share code, notes, and snippets.

@aredridel
Created November 6, 2011 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aredridel/1343709 to your computer and use it in GitHub Desktop.
Save aredridel/1343709 to your computer and use it in GitHub Desktop.
jsviews demo
var image = {thumbnail: "/path/to/thumbnail", caption: "My really awesome image"}
$('thingtoactivateon').click(function() {
$($('#photoDetailsEdit').render(image)).dialog()
})
<script src='jsviews/jsrender.js'></script>
<script id="photoDetailsEdit" type="text/x-jquery-tmpl">
<div>
<p><img src='{{=thumbnail}}'></p>
<p><textarea name='caption'>{{=caption}}</textarea></p>
<p><button>Ok</button></p>
</div>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment