Last active
August 19, 2016 10:49
-
-
Save chaintng/9f16104d4f700158781dbb708d7e4c00 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