Created
December 6, 2009 10:30
-
-
Save pure/250148 to your computer and use it in GitHub Desktop.
Auto-render assign attribute value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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