| Total Complexity | 4 |
| Complexity/F | 1 |
| Lines of Code | 25 |
| Function Count | 4 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | $(function () { |
||
| 2 | $('.spawn-counter').each(function(){ |
||
| 3 | var pokemon_id = $(this).attr('id').substring('spawn_pokemon_'.length); |
||
| 4 | loadSpawnCounter(pokemon_id); |
||
| 5 | }) |
||
| 6 | }); |
||
| 7 | |||
| 8 | function loadSpawnCounter(pokemon_id){ |
||
| 9 | $.ajax({ |
||
| 10 | 'async': true, |
||
| 11 | 'type': "GET", |
||
| 12 | 'global': false, |
||
| 13 | 'dataType': 'json', |
||
| 14 | 'url': "core/process/aru.php", |
||
| 15 | 'data': { |
||
| 16 | 'request': "", |
||
| 17 | 'target': 'arrange_url', |
||
| 18 | 'method': 'method_target', |
||
| 19 | 'type' : 'pokedex', |
||
| 20 | 'pokemon_id' : pokemon_id |
||
| 21 | } |
||
| 22 | }).done(function (data) { |
||
| 23 | $('#spawn_pokemon_'+pokemon_id).text(data.total); |
||
| 24 | }); |
||
| 25 | } |
||
| 26 |