MediaWiki:Sandbox.js
Jump to navigation
Jump to search
CSS and Javascript changes must comply with the wiki design rules.
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Clear the cache in Tools → Preferences
/*
* This is a sandbox.
*/
$(function () {
var pkmn = {
"Bulbasaur": { ja: "フシギダネ", type1: "Grass", type2: "Poison"},
"Ivysaur": { ja: "フシギソウ", type1: "Grass", type2: "Poison" },
"Venusaur": { ja: "フシギバナ", type1: "Grass", type2: "Poison" }
};
var name = $('#name').text();
$.each(pkmn, function(key, value) {
if (key == name) {
$('#ja').text(value.ja);
$('#type1').text(value.type1);
$('#type2').text(value.type2);
}
});
});