I have a button that clears an image in Phonegap App. On click it executes the following code:
document.getElementById('image').src='';
It works on my phones, but it doesn't work on tablets. I am not sure why. On all the iPads and Android tablets the image stays there, but it works when it is on Android phones and iPhones.
Edit
$('#image').attr('src','');
Both doesn't work for Tablet, as Peanut said, have to hide it(set it to None, then when you have a new src, then set it back to inline then it will work) but for Iphones and Android phones, the src='' works, just not for ipads and android pads
Related
Using a fixed css3 background images works fine for the desktop (Chrome, Firefox, IE/Edge no issues), it stays always at the screen with full-height and width bg.
Unfortunately it does not work on mobile devices. Tablets and phones with Android are unable to fix the image in the background.
Is there a way to check the device height/width to load different media or is it possible to simply zoom or scale the image automatically? Are there maybe any JS kits to accomplish this.
Moreover I plan to embed a background video (webm), does this work on mobile devices? May I ask to check if there is way, the video background loads only with WiFi connection. Otherwise it shall be a static image.
I've developed a one-page website using Bootstrap. http://cpproject.co.uk/social2/
The website works totally fine on all other devices, responsive and also you can scroll.
However, you can't scroll using the touch screen on Windows Devices and Laptops which have touch screen and using the IE Browser. (Works fine on Chrome on a Touch Laptop)
I can't find anything similar to this. I would really appreciate any help or fixes.
Thanks a lot in advance.
I have a site with full screen background video using BigVideo.js. (http://dfcb.github.io/BigVideo.js/) On mobile devices, android is working great. However, on an apple device the video loads with a 'Play' button that you need to click which loads the video in a modal window over top of the site. Any ideas on how to make this behave like desktop/android devices where the video seamlessly plays in the background? Could there be an Apple app-driven event detecting video and forcing play in a modal?
Example HTML:
<div class="screen" data-video="vid/1-Statue.mp4">
Many mobile devices do not support video autoplay - the idea is to avoid users running up large mobile data bills. Last time I looked all the smaller iOS devices, i.e. iPhones did not.
There is a popular javascript library to detect browser features which includes a test for autoplay which may be useful for you:
https://github.com/Modernizr/Modernizr/blob/master/feature-detects/video/autoplay.js
Similarly, inline video is not supported on all Mobile devices - it is evolving so more devices do now but it is probably not a good idea to rely on it. Again, there is at least one open source library trying to address this on iPhone (inline video works on iPads last time I checked, as far as I recall):
https://github.com/newshorts/InlineVideo
I made a simple little "wack-a-mole"-style game for my kids with JavaScript and HTML, and it performs exactly as it should on a PC. As soon as you tap the animal (penguin, in this case) it shows as being wacked. I'm using a window.setTimeout to try to time the images.
However, on tablets (tried on an iPad and an iPad Mini 2) there is a delay when tapping, so it isn't always counted correctly. I've tried it on a Windows 10 PC with touch screen and it functions as expected, but on the iPads it always has a small delay, but enough to throw off the gameplay.
Is there any way to account for this delay on mobile devices? I hesitate to change the timing of all of the images (the penguin poking its head up, then coming all the way up, then going back into its hole) because it works just like it should on Windows PCs.
I tested it in both Chrome and Safari on the iPad and iPad Mini 2, with the same results.
Thanks in advance.
I have a simple form with text fields in my webview. In all the other iOS & iPhones, whenever the text fields gets focus and keyboard comes up, the webview nicely pushes the html up without any distortion. I don't even need to write any separate code for this. However, in iPhone 5S with iOS 7.0.2, the webview kind of shrinks the html, and triggers the landscape media query in my css, so my view gets into the landscape mode even if actually the phone is in portrait mode.
Is this a bug with this version of iOS or can there be a fix?
I even tried setting the height of the page as a fixed value, but that didn't solve this issue.