Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 36 lines (33 sloc) 0.65 kb
80140d0 @beebole Add some tutorial files and merge version 2 to master
beebole authored
1 <html>
2 <head>
3 <title>PURE Unobtrusive Rendering Engine</title>
4 <script src="../libs/jquery.js"></script>
5 <script src="../libs/pure.js"></script>
6 </head>
7 <body>
8 <!-- HTML template -->
9 <ul>
10 <li></li>
11 </ul>
12
13 <script>
14 var data = {
15 animals:[
003ec00 @beebole Use native Array.isArray when available(tx to Ori Avtalion) and force…
beebole authored
16 {name:'mouse'},
80140d0 @beebole Add some tutorial files and merge version 2 to master
beebole authored
17 {name:'cat'},
003ec00 @beebole Use native Array.isArray when available(tx to Ori Avtalion) and force…
beebole authored
18 {name:'bird'},
19 {name:'dog'}
80140d0 @beebole Add some tutorial files and merge version 2 to master
beebole authored
20 ]
21 };
22
23 //declaration of the actions PURE has to do
24 var directive = {
25 'li':{
26 'animal<-animals':{
27 '.':'animal.name'
28 }
29 }
30 };
31
32 // note the use of render instead of autoRender
33 $('ul').render(data, directive);
34 </script>
35 </body>
36 </html>
Something went wrong with that request. Please try again.