While attempting to enhance the functionality of hovering over a 2048 tile, I encountered an issue. Each tile with a value of n is assigned a class 'tile-n'.
Specifically for the basic 'tile-2' tile, I have written hover functionality as follows:
<script>
$( ".tile-2" ).hover(
function(){
alert("in!");
}, function() {
alert("out!");
}
);
</script>
However, nothing seems to happen when hovering and I am unsure if the hover action is being registered. I'm puzzled by this situation.
You can view my implementation at:
The 'tile-2' div can be found at: html.body.container.game-container.tile-container.tile-2.
Despite having plans for more advanced hover actions, I'm currently struggling to make even a simple alert display.