Dug.js 项目简介
Dug.js —— A JSONP to HTML Script示例代码:<script>
dug({
endpoint: 'http://api.dribbble.com/players/justinmezzell/shots',
template: '<ul>\
{{#shots}}\
<li>\
<a href="{{url}}" title="{{title}}">\
<img src="{{image_400_url}}" alt="Image of {{title}}">\
</a>\
</li>\
{{/shots}}\
</ul>'
});
</script>
dug({
endpoint: 'http://api.dribbble.com/players/justinmezzell/shots',
template: '<ul>\
{{#shots}}\
<li>\
<a href="{{url}}" title="{{title}}">\
<img src="{{image_400_url}}" alt="Image of {{title}}">\
</a>\
</li>\
{{/shots}}\
</ul>'
});
</script>