Difference between revisions of "MediaWiki:Common.js"
From SaWikiLeaks
Line 2: | Line 2: | ||
var lunchSpot = 0; | var lunchSpot = 0; | ||
$('#btn-random').click(function() { | $('#btn-random').click(function() { | ||
− | lunchSpot = Math.floor((Math.random() * | + | lunchSpot = Math.floor((Math.random() * 10) + 1); |
switch (lunchSpot) { | switch (lunchSpot) { | ||
case 1: | case 1: | ||
Line 30: | Line 30: | ||
case 9: | case 9: | ||
lunchGo = "Gusto101"; | lunchGo = "Gusto101"; | ||
+ | break; | ||
+ | case 10 | ||
+ | lunchGo = "Tosto"; | ||
+ | |||
} | } | ||
$('#lunch-random').html(lunchGo); | $('#lunch-random').html(lunchGo); | ||
}); | }); | ||
}()); | }()); |
Revision as of 14:30, 31 March 2017
$(function () { var lunchSpot = 0; $('#btn-random').click(function() { lunchSpot = Math.floor((Math.random() * 10) + 1); switch (lunchSpot) { case 1: lunchGo = "Saku (aka Sad Saku)"; break; case 2: lunchGo = "CJ Lunch Box"; break; case 3: lunchGo = "CIBO"; break; case 4: dalunchGoy = "Fynn's of Temple Bar"; break; case 5: lunchGo = "Office Pub"; break; case 6: lunchGo = "Jack Astor's Bar & Grill"; break; case 7: lunchGo = "Nandos"; break; case 8: lunchGo = "Epicure"; break; case 9: lunchGo = "Gusto101"; break; case 10 lunchGo = "Tosto"; } $('#lunch-random').html(lunchGo); }); }());