mobile-safari

How to get full screen mode with a mobile safari web app on IOS 8 Iphone 4S

别说谁变了你拦得住时间么 提交于 2020-01-13 10:00:11
问题 I am very new to mobile development so please don't knock me to much for newbie questions. I think I have the correct meta tags. <meta name="viewport" content="width=device-width, initial-scale=1"> From apples site it said use the below tag to allow running in full screen mode but it does not seem to work. <!-- Allow web app to be run in full-screen mode. --> <meta name="apple-mobile-web-app-capable" content="yes"> Width and Height are set for Iphone 4S on IOS 8 width: 320px; height: 480px I

Bind to custom CSS animation end event with jQuery or JavaScript?

狂风中的少年 提交于 2020-01-13 09:29:12
问题 We have multiple animations against the same object. We need to take different actions when each of these animations end. Right now, we bind to the webkitAnimationEnd event, and use a gnarly if/then statement to handle each animation differently. Is there a way to essentially create custom webkitAnimationEnd events, allowing us to fire a specific event handler when a specific animation ends? For instance, fire handler1 when animation1 ends and fire handler2 when animation2 ends. We're

HTML5 Safari iOS access only camera not photo library

♀尐吖头ヾ 提交于 2020-01-13 04:28:08
问题 <input type="file" capture="camera" accept="image/*"> allows a mobile browser to take a picture. On Android native browser and chrome, clicking the input button launches the camera instantly. On iOS Safari, the button launches an alert asking to "Take Photo" or choose from "Photo Library". How can I launch the native camera immediately? 回答1: It has to do with who is supporting WebRTC. Currently there is no Safari support, partial support from Chrome on Android, experimental support from

how can I emulate iPad browser on Windows

余生颓废 提交于 2020-01-12 11:54:08
问题 How can I emulate iPad browser under windows? I know user agent string and I know browser width/height, screen width/height 回答1: I believe if you emulate the User Agent of the iPad and set your windows size appropriately, you can use Safari (windows download from apple.com) and works pretty cool. Also i haven't tested this, but http://code.google.com/p/ibbdemo2/ looks like a great iPad emulator. 回答2: For anybody else still looking, follow these steps for Safari 4+ : Mobile Safari Settings on

how can I emulate iPad browser on Windows

送分小仙女□ 提交于 2020-01-12 11:53:31
问题 How can I emulate iPad browser under windows? I know user agent string and I know browser width/height, screen width/height 回答1: I believe if you emulate the User Agent of the iPad and set your windows size appropriately, you can use Safari (windows download from apple.com) and works pretty cool. Also i haven't tested this, but http://code.google.com/p/ibbdemo2/ looks like a great iPad emulator. 回答2: For anybody else still looking, follow these steps for Safari 4+ : Mobile Safari Settings on

Conditionally block scrolling/touchmove event in mobile safari

时光毁灭记忆、已成空白 提交于 2020-01-11 19:42:22
问题 iOS 5 now allows native overflow: scroll support. What I'd like to do is disable the touchmove event for everything except elements that have the 'scrollable' class or their children. But I can't seem to get it to work; this is what I've been working with below: <html> <head> <style> .scrollable { height: 5em; overflow-y: scroll; -webkit-overflow-scrolling: touch; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script> // doesn't seem to

Jumping input fields in Safari

感情迁移 提交于 2020-01-11 15:46:49
问题 I'm trying to recreate a pretty cool placeholder UI using only HTML and CSS, and I've almost got it (demo). However, if you type something in an input field and tab to focus on the next, the one you just entered a value into will be offset a little bit in Safari (6.0.5) and MobileSafari (iOS 6.1). It works fine in Chrome (30). To reproduce: Focus on the 'price' input field Enter a value Tab to focus the next input field Watch and amaze while the form eats itself So the question is: what's

Jumping input fields in Safari

别来无恙 提交于 2020-01-11 15:45:29
问题 I'm trying to recreate a pretty cool placeholder UI using only HTML and CSS, and I've almost got it (demo). However, if you type something in an input field and tab to focus on the next, the one you just entered a value into will be offset a little bit in Safari (6.0.5) and MobileSafari (iOS 6.1). It works fine in Chrome (30). To reproduce: Focus on the 'price' input field Enter a value Tab to focus the next input field Watch and amaze while the form eats itself So the question is: what's

Jumping input fields in Safari

六眼飞鱼酱① 提交于 2020-01-11 15:43:46
问题 I'm trying to recreate a pretty cool placeholder UI using only HTML and CSS, and I've almost got it (demo). However, if you type something in an input field and tab to focus on the next, the one you just entered a value into will be offset a little bit in Safari (6.0.5) and MobileSafari (iOS 6.1). It works fine in Chrome (30). To reproduce: Focus on the 'price' input field Enter a value Tab to focus the next input field Watch and amaze while the form eats itself So the question is: what's

Select random row from Safaris client-side database

白昼怎懂夜的黑 提交于 2020-01-11 09:45:43
问题 I'm experimenting with the built in SQL support in the Safari Browser and I want to select a random query via Javascript. SELECT * FROM questions ORDER BY random() Returns not authorized to use function: random See this screenshot. Any suggestions? 回答1: Query using a non-random order, then shuffle the results: tx.executeSql('SELECT * FROM questions',[], function(tx, resultSet) { var resultArray = []; for(var i=0; i < resultSet.rows.length; i+=1) { resultArray.push(resultSet.rows.item(i)); }