Skip to content

Instantly share code, notes, and snippets.

@pure
Created May 24, 2011 09:34
Show Gist options
  • Save pure/988426 to your computer and use it in GitHub Desktop.
Save pure/988426 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>PURE Unobtrusive Rendering Engine</title>
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-debug.js"></script>
<script src="http://github.com/pure/pure/raw/master/libs/pure.js">
</script>
</head>
<body>
<!-- HTML template -->
<div class="template">
Hello <a></a>
</div>
<script type="text/javascript">
YUI().use("pure-yui",function(Y){
Y.on("domready",function(){
var data = {who:"Me",site:"http://www.washingtonpost.com"},
directive = {a:"who","a@href":"site"};
Y.one(".template").render(data,directive);
})
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment