I am having a js code which is using HTML checkboxes.
So far everything works great - when I view it on a computer.
As soon as I view the website on a mobile device it does not work any more.
I started debugging and noticed that the value of the checkboxes always come back true on iphone and android.
To make the setup more clear, please take a look:
<input type="checkbox" name="AA" value="AA" id="AA" checked="true" onclick='function2()'>
<script>
function function2() {
alert(jQuery('#AA').is(':checked'));
}
</script>
The alert message always return true, no matter if the box is checked or not. HOWEVER this only happens on mobile phones, everything works flawlessly on a pc.
Any ideas why this is happening?
Aucun commentaire:
Enregistrer un commentaire