iphone scroll fixed
by winddweb
HTML
<!--Target iPad-->
<link href="ipad.css" rel="stylesheet" media="only screen and (min-device-width: 768px) and (max-device-width: 1024px)" type="text/css" />
<!--Target iPhone 3GS> -->
<link href="iphone.css" rel="stylesheet" media="only screen and (max-device-width: 480px)" type="text/css" />
<!--Target iPhone 4-->
<link href="retnia.css" rel="stylesheet" media="only screen and (-webkit-min-device-pixel-ratio: 2) and (max-device-width: 480px)" type="text/css" />
CSS
header{
position: absolute;
height: 75px;
width: 100%;
-webkit-transition-property: postion;
-webkit-transition-duration: 100ms ;
-webkit-transition-timing-function: ease-in-out;
}
JavaScript
if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')
{
$(window).scroll(function() {
$('header').css('top', $(this).scrollTop());
});
};