[r3]: / monsters / licenses / Monsters 2D Pack | OpenGameArt.org_files / ajax_dlcount.js  Maximize  Restore  History

Download this file

16 lines (16 with data), 418 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
(function ($) {
$(function() {
$('body').delegate('[data-fid]', 'mouseup', function() {
var fid = $(this).attr('data-fid');
var url = '/file/' + fid + '/dlcounter';
$.ajax({
url: url,
success: function(data, textStatus, jqXHR) {
console.log(data);
$('span#dlcount-' + fid).html(data.dlcount);
}
});
return true;
});
});
})(jQuery);