diff --git a/js/client-battle.js b/js/client-battle.js index 84878860a..a33767fff 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -720,6 +720,7 @@ if (x > 335) x = 335; if (y < 140) y = 140; + if (!$('#tooltipwrapper').length) $(document.body).append('
'); $('#tooltipwrapper').css({ left: x, top: y @@ -744,6 +745,7 @@ } text += ''; break; + case 'pokemon': var pokemon = this.battle.getPokemon(thing); if (!pokemon) return; @@ -801,7 +803,6 @@ text += ''; break; } - if (!$('#tooltipwrapper').length) $(document.body).append(''); $('#tooltipwrapper').html(text).appendTo(document.body); }, hideTooltip: function() {