I've got this working on the desktop, but not on mobile. The bar is supposed to appear when the person scrolls up and get stuck to the bottom of the page.
http://54.200.76.33:8080/
On mobile browsers like safari, the bar keeps going until the momentum stops. I'm reading that javascript is disabled while the user scrolls web pages so there's no way to catch the event.
I'm reading the Google tutorial here https://developers.google.com/mobile/articles/webapp_fixed_ui
But I still think this doesn't fix my problem. Are there any plans in the future of fixing mobile browsers? Is there any possible way to work around the problem?
<script type="text/javascript">//<![CDATA[
/*THIS WORKS FINE ON DESKTOP BROWSERS*/
/*Needs to work on mobile browsers*/
$(window).load(function(){
var foundTop = $('.found').offset().top;
$(window).scroll(function () {
var currentScroll = $(window).scrollTop();
if (currentScroll >= 40) {
$('.found').css({
position: 'fixed',
bottom: '0',
left: '0'
});
} else {
$('.found').css({
position: 'absolute',
bottom: '-40px',
});
}
});
});//]]>
</script>