Hi all the people,
I'm trying to render attributes interleaving, at the moment only
obtained the rendering of attributes via block, here's my code:
<html>
<head>
<script src="
http://code.jquery.com/jquery-latest.min.js"></
script>
<script src="pure.js"></script>
</head>
<body>
<div class="template">
<li></li><img src="">
</div>
<script type="text/javascript" charset="utf-8">
var data = $.getJSON("
http://api.flickr.com/services/feeds/
photos_public.gne?&tags=r2d2&tagmode=all&format=json&jsoncallback=?",
function(json){
directive = {
li:{
'it<-items':{
'.':'it.title'
}
},
img:{
'it<-items':{
'.@src':'it.media.m'
}
}
}
$('div.template').render(json, directive);
});
</script>
</body>
</html>
Sautti a tutti