I'm trying to figure out a difference between iPad and iPhone behavior using Javascript.
Using this code to switch between elements by changing class and switching between opacity (previously display:none), it works fine in Android, Desktop and iPad, but iPhone refuses.
I have 6 divs like this here as example:
<div id="blue6" onclick="show('id6');" class="switchDivContainer" style="border-bottom:0px;">
And code like this to control it
function show(elementId) {
document.getElementById("id6").className = "hideClass";
document.getElementById(elementId).className = "MyClass";
}
</script>
Live page can actually be seen here The blue area should make the images/videos switch, but iPhone says no-no.
The question is really - why does this work like a charm in everything but iPhone.