for mobile javascript:
- http://matt.might.net/
articles/how-to-native-iphone- ipad-apps-in-javascript/ - http://www.quirksmode.org/m/
table.html - http://padilicious.com/code/
touchevents/basicswipe.html
Here's how you do that mini-scroll on page load to hide the address bar:
setTimeout(function(){
// Hide the address bar!
window.scrollTo(0, 1);
}, 0);
Here's a very fancy network detector:
/**
* Original idea:
* http://stackoverflow.com/
*
* but more importantly here:
* http://www.thefutureoftheweb.
*
*/
metai.checkNetwork = function( contentId ){
var imageEl=document.
var imageurl=hostURI+contextRoot+'
imageEl.style.visibility='
//imageEl.onload=metai.
//var imagetook=0;
var startDate=new Date();
imageEl.onload=function(){
var endDate=new Date();
var latency=endDate.getTime()-
//alert(latency);
if( latency < 200 ){
playFast( contentId );
}else{
playSlow( contentId );
}
}
imageEl.src=imageurl+'?r='+
document.body.appendChild(
}
No comments:
Post a Comment