Skip to content
Find file
25 lines (22 sloc) 730 Bytes
<title>PURE Unobtrusive Rendering Engine</title>
<script src="../libs/jquery.js"></script>
<script src="../libs/pure.js"></script>
<!-- HTML template -->
<div class="template">
Hello <a></a>
var data = {'who':'BeeBole!', site:''},
directive = {
'a':'who', //look for the tag 'a' and place the value of the property 'who' in its node value
'a@href':'site' //look for the tag a, and set its attribute 'href' to the value of the property 'site'
//note the use of render instead of autoRender and the 2nd parameter with directive
$('div.template').render(data, directive);
Jump to Line
Something went wrong with that request. Please try again.