I have an odd problem. I have a simple bit of jquery which changes the content of a div from a plus sign to a tick when a user clicks it.
$(document).on("click", ".myDiv", function() {
$(this).html('✔');
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="myDiv" style="background-color:rgb(0,0,0); color:rgb(255,255,255)">+</div>
The color of the text is important as it is being dynamically set to ensure it displays against the also dynamically set background. This all works well on my desktop, but when I look on a iPad the tick will always display in black and on an Android phone it is showing as red.
It would appear that this has something to do with the non-standard character. If I replace the tick with a *
, for example, everything works fine.
Any ideas to stop this happening please?