In my tile-based game, the tiles are composed of 25x30 divs that are 16x16px each. I have implemented on-screen controls to facilitate character movement, where clicking a direction updates the player id to the corresponding div. My query here is whether it is feasible to trigger the loading of a new page when the player id matches a certain div.
For instance:
<div id="player"><img src="assets/img/charcter/ash.png"/></div>
Player ID
<div id="13_5" class="mapsquare teleporttile"></div>
Teleport div
If I steer my player onto the div with the 'teleportile' class using arrow keys, is there a way to load a webpage in the current window? I'm struggling to find a solution for this dilemma. Your help would be much appreciated!