15 lines
418 B
JavaScript
15 lines
418 B
JavaScript
|
$(function() {
|
||
|
$('#examples').each(function(index, elem) {
|
||
|
$.getJSON(
|
||
|
'http://ksenia.causa-arcana.com/api/examples?ids=' + $(elem).data('ids'),
|
||
|
function(data) {
|
||
|
var list_items = []
|
||
|
data.forEach(function(item) {
|
||
|
list_items.push('<li>' + item[0] + ' — ' + item[1] + '</li>')
|
||
|
})
|
||
|
$(elem).html('<ul>' + list_items.join('') + '</ul>')
|
||
|
},
|
||
|
)
|
||
|
})
|
||
|
})
|