Skip to content

Instantly share code, notes, and snippets.

@typeoneerror
Created September 7, 2010 02:41
Show Gist options
  • Save typeoneerror/567786 to your computer and use it in GitHub Desktop.
Save typeoneerror/567786 to your computer and use it in GitHub Desktop.
$.isMobileSafari = function(){return navigator.userAgent.match(/AppleWebKit\/(.*)Mobile\//);}
if ($.isMobileSafari())
{
$("#facebook").hide();
$(document).bind("touchstart", function()
{
$("#facebook").hide();
});
$(window).bind("scroll", function()
{
var position = (window.pageYOffset + window.innerHeight);
$("#facebook").show().css("top", position).animate({top: position - $("#facebook").height()}, 150);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment