Skip to content

Instantly share code, notes, and snippets.

@micahalles
Created July 11, 2011 03:07
Show Gist options
  • Save micahalles/1075263 to your computer and use it in GitHub Desktop.
Save micahalles/1075263 to your computer and use it in GitHub Desktop.
Selectors
$("#my-template").expand({
"$h2": "Cooking with Crowley",
"$.content p.excerpt": "Step 1, light the grill. Step 2..."
})
<div>
<h2 class="name">Cooking with Crowley</h2>
<div class="content">
<p class="excerpt">Step 1, light the grill. Step 2...</p>
</div>
</div>
<div id="my-template">
<h2 class="name"></h2>
<div class="content">
<p class="excerpt"/>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment