Skip to content

Instantly share code, notes, and snippets.

@micahalles
Created July 11, 2011 03:12
Show Gist options
  • Save micahalles/1075268 to your computer and use it in GitHub Desktop.
Save micahalles/1075268 to your computer and use it in GitHub Desktop.
Calling Functions
$("#my-template").expand({
author: { "addClass()": "awesome" },
"$input[name=comment]": { "val()": "nice post!" }
})
<div>
<span class="author awesome"></span>
<input type="text" name="comment" value="nice post!" />
</div>
<div id="my-template">
<span class="author"></span>
<input type="text" name="comment" />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment