Skip to content

Instantly share code, notes, and snippets.

@pure
Created December 6, 2009 10:30
Show Gist options
  • Save pure/250148 to your computer and use it in GitHub Desktop.
Save pure/250148 to your computer and use it in GitHub Desktop.
Auto-render assign attribute value
<html>
<head>
<title>PURE Unobtrusive Rendering Engine</title>
<script src="../libs/jquery.js"></script>
<script src="../libs/pure.js"></script>
</head>
<body>
<!--
note the property@attribute notation
'site@href' means place the value of the property "site"
in the attribute "href"
-->
Hello <a class="who site@href"></a>
<script>
var data = {who:'BeeBole', site:'http://beebole.com'};
$('a').autoRender(data);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment