Difference between revisions of "MediaWiki:Common.js"
From SaWikiLeaks
Line 6: | Line 6: | ||
dataType: 'json', | dataType: 'json', | ||
success: function(jsondata){ | success: function(jsondata){ | ||
− | |||
$('#lunch-random').html(jsondata.percentages + '<br/>' + jsondata.choice); | $('#lunch-random').html(jsondata.percentages + '<br/>' + jsondata.choice); | ||
} | } |
Revision as of 15:39, 31 March 2017
$(function () { $('#btn-random').click(function() { $.ajax({ type: "GET", url: 'http://sawikileaks.org/extra/lunchalgo.php', dataType: 'json', success: function(jsondata){ $('#lunch-random').html(jsondata.percentages + '<br/>' + jsondata.choice); } }); }); }());