After fiddling around a bit more, this will only trigger API calls to the mediawiki whenever someone hovers their mouse over an item, which should dramatically reduce the server load on the wiki
Code:
$(document).ready(function() {
$('.item-data-placeholder').mouseenter(function() {
var $this = $(this);
// Check if the data has already been fetched
if (!$this.data('fetched')) {
var itemId = this.id.replace('item-data-', ''); // Trims "item-data-" prefix
$.get(mw.util.wikiScript('api'), {
action: 'parse',
contentmodel: 'wikitext',
text: '{{:' + itemId + '}}',
prop: 'text',
format: 'json'
}, function(data) {
var itemData = data.parse.text['*'];
var itemLink = mw.util.getUrl(itemId);
$this.html('<a href="' + itemLink + '">' + itemData + '</a>');
// Mark the data as fetched
$this.data('fetched', true);
});
}
});
});