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

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -