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