MediaWiki:Sandbox.js: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 6: | Line 6: | ||
// pkmnList (object): List of Pokémon's Japanese names and their types. | // pkmnList (object): List of Pokémon's Japanese names and their types. | ||
var pkmnList = { | var pkmnList = { | ||
Bulbasaur: { ja: "フシギダネ", type1: "Grass" }, | |||
Ivysaur: { ja: "フシギソウ", type1: "Grass" }, | |||
Venusaur: { ja: "フシギバナ", type1: "Grass", type2: "Poison" } | |||
}; | }; | ||
// Shows the selected Pokémon's Japanese name and their types in the table. | // Shows the selected Pokémon's Japanese name and their types in the table. | ||
$.each( | $.each($('#pkmn tr'), function(k, v) { | ||
var tr = $(this).attr('id', 'line' + k); | |||
}); | }); | ||
}); | }()); |
Revision as of 15:25, 2 October 2022
/*
* This is a sandbox.
*/
$(function() {
// pkmnList (object): List of Pokémon's Japanese names and their types.
var pkmnList = {
Bulbasaur: { ja: "フシギダネ", type1: "Grass" },
Ivysaur: { ja: "フシギソウ", type1: "Grass" },
Venusaur: { ja: "フシギバナ", type1: "Grass", type2: "Poison" }
};
// Shows the selected Pokémon's Japanese name and their types in the table.
$.each($('#pkmn tr'), function(k, v) {
var tr = $(this).attr('id', 'line' + k);
});
}());