-
-
Save antronic/e41533527e510b052b1a046fd83a5e49 to your computer and use it in GitHub Desktop.
pokedex-jquery-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. set Listener for each filter | |
$("#pokemonTypeFilter").on('change', function(){ | |
var filterPokemonType = this.value; | |
var filterPokemonAtk = $("#pokemonAtkFilter").val(); | |
var filterPokemon = filterPokemonByTypeAndMinAtk(allPokemons, filterPokemonType, filterPokemonAtk); | |
renderPokemonList(filterPokemon); | |
}); | |
$("#pokemonAtkFilter").on('keyup', function(){ | |
var filterPokemonAtk = this.value; | |
var filterPokemonType = $("#pokemonTypeFilter").val(); | |
var filterPokemon = filterPokemonByTypeAndMinAtk(allPokemons, filterPokemonType, filterPokemonAtk); | |
renderPokemonList(filterPokemon); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment