inline style changes by javascript don't work on mobile browsers (chrome/dolphin/android): why? -


jfiddle link

expected behavior (as performed on pc/windows browser): h1 header "gif" disappears , video plays

mobile behavior: gif not disappear- video does play (so js firing)

why doesn't display toggle work on mobile (android) chrome way in windows chrome?

relivant code:

this.play(); this.removeattribute("controls"); //works //h1.style.display="none"; //does not work this.previoussibling.style.display="none"; //does not work 

onclick not valid event in touch devices. try ontouchstart mobile version. touch event object doesn't contain offsety. instead, can use pagey on both mobile , desktop browsers.

here working demo.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -