Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: cc70681285
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (25 sloc) 0.702 kb
<html>
<head>
<title>PURE Unobtrusive Rendering Engine</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.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>
<!-- result place -->
<div class="result"></div>
<script>
var jsonData = {'who':'BeeBole!', site:'http://beebole.com'};
$('div.template')
//set the directives
.directives({ 'a':'who', 'a@href':'site' })
//call render with the JSON data
.render(jsonData)
//use any jQuery command on the generated HTML
.appendTo('div.result');
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.